prefer the third party intents SIM over the default one

This commit is contained in:
tibbi 2020-05-02 20:23:09 +02:00
parent 91c33b5030
commit 1ddbe9a06c
1 changed files with 1 additions and 1 deletions

View File

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