Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ab204c1 authored by Nancy Chen's avatar Nancy Chen
Browse files

Handle MMI for multi-SIM (2/3)

+ Add Telecomm and Telephony methods for handlePinMMIForSubscriber
+ Add Select Account dialog in Dialer for MMI

Bug: 17917937
Change-Id: I47d1a2e9555434bb99759b957fa119dac92eb7cd
parent 9b8badbc
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -461,6 +461,27 @@ public class TelecomServiceImpl extends ITelecomService.Stub {
        return retval;
    }

    /**
     * @see android.telecom.TelecomManager#handleMmi
     */
    @Override
    public boolean handlePinMmiForPhoneAccount(PhoneAccountHandle accountHandle,
            String dialString) {
        enforceModifyPermissionOrDefaultDialer();

        // Switch identity so that TelephonyManager checks Telecom's permissions instead.
        long token = Binder.clearCallingIdentity();
        boolean retval = false;
        try {
            int subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
            retval = getTelephonyManager().handlePinMmiForSubscriber(subId, dialString);
        } finally {
            Binder.restoreCallingIdentity(token);
        }

        return retval;
    }

    /**
     * @see android.telecom.TelecomManager#isTtySupported
     */