Remove logic to manually search inactive pSIM.

Nowe inserted inactive pSIM will be included in Telephony's get
available and get selectable subInfo list so that logic is no longer
needed.

Bug: 147128878
Test: unittest
Merged-In: Icd131f133e47dae0770a4da71c51de3c2a94b42b
Change-Id: I9ba5dded7817116c02d70298c9c271ff6a99925b
This commit is contained in:
Malcolm Chen
2020-01-15 14:54:06 -08:00
committed by Bonian Chen
parent 9057a78bfa
commit 3805373f90
2 changed files with 0 additions and 61 deletions

View File

@@ -38,7 +38,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -87,37 +86,6 @@ public class SubscriptionUtilTest {
assertThat(subs).hasSize(2);
}
@Test
public void getAvailableSubscriptions_oneSelectableOneDisabledPSim_twoResults() {
final SubscriptionInfo info1 = mock(SubscriptionInfo.class);
final SubscriptionInfo info2 = mock(SubscriptionInfo.class);
when(info1.getSubscriptionId()).thenReturn(111);
when(info1.getSimSlotIndex()).thenReturn(-1);
when(info1.getCardString()).thenReturn("info1_cardid");
when(info2.getSubscriptionId()).thenReturn(222);
when(info2.getSimSlotIndex()).thenReturn(0);
when(info2.getCardString()).thenReturn("info2_cardid");
when(mSubMgr.getSelectableSubscriptionInfoList()).thenReturn(Arrays.asList(info1));
when(mSubMgr.getAllSubscriptionInfoList()).thenReturn(Arrays.asList(info1, info2));
final UiccSlotInfo info2slot = mock(UiccSlotInfo.class);
when(info2slot.getCardStateInfo()).thenReturn(CARD_STATE_INFO_PRESENT);
when(info2slot.getLogicalSlotIdx()).thenReturn(0);
when(info2slot.getCardId()).thenReturn("info2_cardid");
final UiccSlotInfo[] slotInfos = {info2slot};
when(mTelMgr.getUiccSlotsInfo()).thenReturn(slotInfos);
final List<SubscriptionInfo> subs = SubscriptionUtil.getAvailableSubscriptions(mContext);
assertThat(subs).hasSize(2);
assertThat(subs.get(0).getSubscriptionId()).isEqualTo(111);
assertThat(subs.get(1).getSubscriptionId()).isEqualTo(222);
}
@Test
public void getAvailableSubscriptions_oneSelectableTwoDisabledPSimsOneAbsent_twoResults() {
final SubscriptionInfo info1 = mock(SubscriptionInfo.class);