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

Commit a39737ec authored by Muralidhar Reddy's avatar Muralidhar Reddy Committed by Automerger Merge Worker
Browse files

Update cardId for downloaded embedded profile am: 8cb57e7d

parents e175b76d 8cb57e7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1117,6 +1117,7 @@ public class SubscriptionManagerService extends ISub.Stub {
                    // CARD_ID field should not contain the EID
                    if (cardId >= 0 && mUiccController.getCardIdForDefaultEuicc()
                            != TelephonyManager.UNSUPPORTED_CARD_ID) {
                        builder.setCardId(cardId);
                        builder.setCardString(mUiccController.convertToCardString(cardId));
                    }

+8 −0
Original line number Diff line number Diff line
@@ -812,6 +812,8 @@ public class SubscriptionManagerServiceTest extends TelephonyTest {
        doReturn(result).when(mEuiccController).blockingGetEuiccProfileInfoList(eq(2));
        doReturn(TelephonyManager.INVALID_PORT_INDEX).when(mUiccSlot)
                .getPortIndexFromIccId(anyString());
        doReturn(FAKE_ICCID1).when(mUiccController).convertToCardString(eq(1));
        doReturn(FAKE_ICCID2).when(mUiccController).convertToCardString(eq(2));

        mSubscriptionManagerServiceUT.updateEmbeddedSubscriptions(List.of(1, 2), null);
        processAllMessages();
@@ -832,6 +834,9 @@ public class SubscriptionManagerServiceTest extends TelephonyTest {
        assertThat(subInfo.isEmbedded()).isTrue();
        assertThat(subInfo.isRemovableEmbedded()).isFalse();
        assertThat(subInfo.getNativeAccessRules()).isEqualTo(FAKE_NATIVE_ACCESS_RULES1);
        // Downloaded esim profile should contain proper cardId
        assertThat(subInfo.getCardId()).isEqualTo(1);
        assertThat(subInfo.getCardString()).isEqualTo(FAKE_ICCID1);

        subInfo = mSubscriptionManagerServiceUT.getSubscriptionInfoInternal(2);
        assertThat(subInfo.getSubscriptionId()).isEqualTo(2);
@@ -848,6 +853,9 @@ public class SubscriptionManagerServiceTest extends TelephonyTest {
        assertThat(subInfo.isEmbedded()).isTrue();
        assertThat(subInfo.isRemovableEmbedded()).isFalse();
        assertThat(subInfo.getNativeAccessRules()).isEqualTo(FAKE_NATIVE_ACCESS_RULES2);
        // Downloaded esim profile should contain proper cardId
        assertThat(subInfo.getCardId()).isEqualTo(2);
        assertThat(subInfo.getCardString()).isEqualTo(FAKE_ICCID2);
    }

    @Test