Implement start of backups payment integration work.

This commit is contained in:
Alex Hart
2024-05-29 16:48:33 -03:00
committed by Greyson Parrelli
parent 680223c4b6
commit 6b50be78c0
81 changed files with 1492 additions and 1141 deletions

View File

@@ -3,6 +3,16 @@ package org.signal.core.util
import android.os.Build
import android.os.Bundle
import android.os.Parcelable
import java.io.Serializable
fun <T : Serializable> Bundle.getSerializableCompat(key: String, clazz: Class<T>): T? {
return if (Build.VERSION.SDK_INT >= 33) {
this.getSerializable(key, clazz)
} else {
@Suppress("DEPRECATION", "UNCHECKED_CAST")
this.getSerializable(key) as T?
}
}
fun <T : Parcelable> Bundle.getParcelableCompat(key: String, clazz: Class<T>): T? {
return if (Build.VERSION.SDK_INT >= 33) {