Add support for displaying both ACI and e164 safety numbers.

This commit is contained in:
Clark
2023-07-19 10:17:45 -04:00
committed by Nicholas
parent 00bbb6bc6e
commit 461875b0e4
29 changed files with 1633 additions and 848 deletions

View File

@@ -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)