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

Commit 59a3670e authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Update SubscriptionController on NOT_READY only if it is terminal state.

This was a regression introduced due to ag/13992624

Test: manually verified the failing scenario
Test: atest SubscriptionInfoUpdater
Bug: 186680230
Change-Id: If7a12ea59b646f20b675cf08a56cf02dfa4f1a83
parent 039dec8c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -457,10 +457,10 @@ public class SubscriptionInfoUpdater extends Handler {
            // At this phase, the subscription list is accessible. Treating NOT_READY
            // as equivalent to ABSENT, once the rest of the system can handle it.
            sIccId[phoneId] = ICCID_STRING_FOR_NO_SIM;
            updateSubscriptionInfoByIccId(phoneId, false /* updateEmbeddedSubs */);
        } else {
            sIccId[phoneId] = null;
        }
        updateSubscriptionInfoByIccId(phoneId, false /* updateEmbeddedSubs */);

        broadcastSimStateChanged(phoneId, IccCardConstants.INTENT_VALUE_ICC_NOT_READY,
                null);
+2 −2
Original line number Diff line number Diff line
@@ -246,8 +246,8 @@ public class SubscriptionInfoUpdaterTest extends TelephonyTest {
                mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
        verify(mConfigManager, never()).updateConfigForPhoneId(eq(FAKE_PHONE_ID_1),
                eq(IccCardConstants.INTENT_VALUE_ICC_NOT_READY));
        verify(mSubscriptionController).clearSubInfoRecord(FAKE_PHONE_ID_1);
        verify(mSubscriptionController).notifySubscriptionInfoChanged();
        verify(mSubscriptionController, never()).clearSubInfoRecord(FAKE_PHONE_ID_1);
        verify(mSubscriptionController, never()).notifySubscriptionInfoChanged();
    }

    @Test