mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Add support for displaying both ACI and e164 safety numbers.
This commit is contained in:
@@ -13,6 +13,15 @@ fun <T : Parcelable> Bundle.getParcelableCompat(key: String, clazz: Class<T>): T
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : Parcelable> Bundle.requireParcelableCompat(key: String, clazz: Class<T>): T {
|
||||
return if (Build.VERSION.SDK_INT >= 33) {
|
||||
this.getParcelable(key, clazz)!!
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
this.getParcelable(key)!!
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : Parcelable> Bundle.getParcelableArrayListCompat(key: String, clazz: Class<T>): ArrayList<T>? {
|
||||
return if (Build.VERSION.SDK_INT >= 33) {
|
||||
this.getParcelableArrayList(key, clazz)
|
||||
|
||||
Reference in New Issue
Block a user