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

Commit 716f4e1a authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Changes to not use getFullIccId in SubscriptionInfo." into nyc-dev

parents e8acb3d6 525130aa
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -285,7 +285,7 @@ public class SubscriptionInfoUpdater extends Handler {
                if (ar.exception == null) {
                if (ar.exception == null) {
                    if (ar.result != null) {
                    if (ar.result != null) {
                        byte[] data = (byte[])ar.result;
                        byte[] data = (byte[])ar.result;
                        mIccId[slotId] = IccUtils.bchToString(data, 0, data.length);
                        mIccId[slotId] = IccUtils.bcdToString(data, 0, data.length);
                    } else {
                    } else {
                        logd("Null ar");
                        logd("Null ar");
                        mIccId[slotId] = ICCID_STRING_FOR_NO_SIM;
                        mIccId[slotId] = ICCID_STRING_FOR_NO_SIM;
@@ -393,11 +393,11 @@ public class SubscriptionInfoUpdater extends Handler {
            logd("onRecieve: IccRecords null");
            logd("onRecieve: IccRecords null");
            return;
            return;
        }
        }
        if (records.getFullIccId() == null) {
        if (records.getIccId() == null) {
            logd("onRecieve: IccID null");
            logd("onRecieve: IccID null");
            return;
            return;
        }
        }
        mIccId[slotId] = records.getFullIccId();
        mIccId[slotId] = records.getIccId();


        if (isAllIccIdQueryDone()) {
        if (isAllIccIdQueryDone()) {
            updateSubscriptionInfoByIccId();
            updateSubscriptionInfoByIccId();
+2 −2
Original line number Original line Diff line number Diff line
@@ -223,7 +223,7 @@ public class SubscriptionInfoUpdaterTest extends TelephonyTest {
        /* mock new sim got loaded and there is no sim loaded before */
        /* mock new sim got loaded and there is no sim loaded before */
        doReturn(null).when(mSubscriptionController)
        doReturn(null).when(mSubscriptionController)
                .getSubInfoUsingSlotIdWithCheck(eq(0), anyBoolean(), anyString());
                .getSubInfoUsingSlotIdWithCheck(eq(0), anyBoolean(), anyString());
        doReturn("89012604200000000000").when(mIccRecord).getFullIccId();
        doReturn("89012604200000000000").when(mIccRecord).getIccId();
        doReturn(FAKE_PLMN).when(mTelephonyManager).getSimOperatorNumericForPhone(0);
        doReturn(FAKE_PLMN).when(mTelephonyManager).getSimOperatorNumericForPhone(0);
        Intent intentInternalSimStateChanged =
        Intent intentInternalSimStateChanged =
                new Intent(IccCardProxy.ACTION_INTERNAL_SIM_STATE_CHANGED);
                new Intent(IccCardProxy.ACTION_INTERNAL_SIM_STATE_CHANGED);
@@ -284,7 +284,7 @@ public class SubscriptionInfoUpdaterTest extends TelephonyTest {
        /* mock new sim got loaded and there is no sim loaded before */
        /* mock new sim got loaded and there is no sim loaded before */
        doReturn(null).when(mSubscriptionController)
        doReturn(null).when(mSubscriptionController)
                .getSubInfoUsingSlotIdWithCheck(eq(0), anyBoolean(), anyString());
                .getSubInfoUsingSlotIdWithCheck(eq(0), anyBoolean(), anyString());
        doReturn("89012604200000000000").when(mIccRecord).getFullIccId();
        doReturn("89012604200000000000").when(mIccRecord).getIccId();
        // operator numeric is empty
        // operator numeric is empty
        doReturn("").when(mTelephonyManager).getSimOperatorNumericForPhone(0);
        doReturn("").when(mTelephonyManager).getSimOperatorNumericForPhone(0);
        Intent mIntent = new Intent(IccCardProxy.ACTION_INTERNAL_SIM_STATE_CHANGED);
        Intent mIntent = new Intent(IccCardProxy.ACTION_INTERNAL_SIM_STATE_CHANGED);