adding one more crashfix

This commit is contained in:
tibbi 2020-05-15 10:38:31 +02:00
parent 4fbf85af78
commit ef592f5f82

View File

@ -34,4 +34,10 @@ fun Context.getAvailableSIMCardLabels(): ArrayList<SIMAccount> {
}
@SuppressLint("MissingPermission")
fun Context.areMultipleSIMsAvailable() = telecomManager.callCapablePhoneAccounts.size > 1
fun Context.areMultipleSIMsAvailable(): Boolean {
return try {
telecomManager.callCapablePhoneAccounts.size > 1
} catch (ignored: Exception) {
false
}
}