diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-08-30 03:28:55 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-08-30 03:28:55 +0000 |
commit | 050b6f7bafd6e236c8efd985cfa1c297dda684de (patch) | |
tree | 8a2468a37fc4287f6627a6e9a6538581d07bcccc | |
parent | c15d2681da4bf09ec815d202878af8723ffeb87a (diff) | |
parent | 7b8fe588b88c72815e40d18eea1f7b421ba92e3c (diff) | |
download | telephony-android14-d1-release.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/24444269'] into udc-d1-release.android-14.0.0_r12android-14.0.0_r11android14-d1-release
Change-Id: I306ef5632f243ed6b29d093101a7808549fe37fd
2 files changed, 9 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java index 3872b2c33e..1eb765374b 100644 --- a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +++ b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java @@ -1115,6 +1115,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)); } diff --git a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionManagerServiceTest.java b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionManagerServiceTest.java index ba6f046d09..c6731a3170 100644 --- a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionManagerServiceTest.java +++ b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionManagerServiceTest.java @@ -809,6 +809,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(); @@ -829,6 +831,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); @@ -845,6 +850,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 |