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) {
|
private fun getHandleToUse(callback: (PhoneAccountHandle) -> Unit) {
|
||||||
val defaultHandle = telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL)
|
val defaultHandle = telecomManager.getDefaultOutgoingPhoneAccount(PhoneAccount.SCHEME_TEL)
|
||||||
when {
|
when {
|
||||||
|
intent.hasExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE) -> callback(intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE)!!)
|
||||||
defaultHandle != null -> callback(defaultHandle)
|
defaultHandle != null -> callback(defaultHandle)
|
||||||
intent.hasExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE) -> callback(intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE))
|
|
||||||
else -> {
|
else -> {
|
||||||
handlePermission(PERMISSION_READ_PHONE_STATE) {
|
handlePermission(PERMISSION_READ_PHONE_STATE) {
|
||||||
if (it) {
|
if (it) {
|
||||||
|
|
Loading…
Reference in New Issue