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

Commit 0c6fe60c authored by Shuo Qian's avatar Shuo Qian Committed by sqian
Browse files

Change to getSubscriptionId

Test: build
Bug: 144097052
Change-Id: I9a20d969c40a7dc7255facaa3860fbaefd0bf8cd
parent 83878322
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class CreateConnectionProcessor implements CreateConnectionResponse {
            if (manager == null) {
                return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
            }
            return manager.getSubIdForPhoneAccountHandle(account.getAccountHandle());
            return manager.getSubscriptionId(account.getAccountHandle());
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ public class PhoneAccountRegistrar {
        if (account != null && account.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
            TelephonyManager tm =
                    (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
            return tm.getSubIdForPhoneAccountHandle(accountHandle);
            return tm.getSubscriptionId(accountHandle);
        }
        return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
    }
+1 −1
Original line number Diff line number Diff line
@@ -502,7 +502,7 @@ public class ComponentContextFixture implements TestFixture<Context> {
        // Used in CreateConnectionProcessor to rank emergency numbers by viability.
        // For the test, make them all equal to INVALID so that the preferred PhoneAccount will be
        // chosen.
        when(mTelephonyManager.getSubIdForPhoneAccountHandle(any())).thenReturn(
        when(mTelephonyManager.getSubscriptionId(any())).thenReturn(
                SubscriptionManager.INVALID_SUBSCRIPTION_ID);

        when(mTelephonyManager.getNetworkOperatorName()).thenReturn("label1");