prefer the third party intents SIM over the default one
This commit is contained in:
parent
91c33b5030
commit
1ddbe9a06c
|
@ -65,8 +65,8 @@ class DialerActivity : SimpleActivity() {
|
|||
private fun getHandleToUse(callback: (PhoneAccountHandle) -> Unit) {
|
||||
val defaultHandle = telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL)
|
||||
when {
|
||||
intent.hasExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE) -> callback(intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE)!!)
|
||||
defaultHandle != null -> callback(defaultHandle)
|
||||
intent.hasExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE) -> callback(intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE))
|
||||
else -> {
|
||||
handlePermission(PERMISSION_READ_PHONE_STATE) {
|
||||
if (it) {
|
||||
|
|
Loading…
Reference in New Issue