Create selectableSubscriptionInfoListFlow

Which can be used in MobileNetworkSummaryController in the future.

Bug: 366097262
Flag: EXEMPT refactor
Test: manual - check Network & internet
Test: unit tests
Change-Id: Ia74af993646c2e1d53817f1e9f8ac3ef0b8fa97a
This commit is contained in:
Chaohui Wang
2024-09-12 11:43:05 +08:00
parent 04ef86d174
commit ced86bf56d
4 changed files with 48 additions and 44 deletions

View File

@@ -120,7 +120,7 @@ class SubscriptionRepositoryTest {
)
}
val subInfos = context.getSelectableSubscriptionInfoList()
val subInfos = repository.getSelectableSubscriptionInfoList()
assertThat(subInfos.map { it.simSlotIndex })
.containsExactly(SIM_SLOT_INDEX_0, SIM_SLOT_INDEX_1).inOrder()
@@ -141,7 +141,7 @@ class SubscriptionRepositoryTest {
)
}
val subInfos = context.getSelectableSubscriptionInfoList()
val subInfos = repository.getSelectableSubscriptionInfoList()
assertThat(subInfos.map { it.simSlotIndex })
.containsExactly(SIM_SLOT_INDEX_1, SubscriptionManager.INVALID_SIM_SLOT_INDEX).inOrder()
@@ -164,7 +164,7 @@ class SubscriptionRepositoryTest {
)
}
val subInfos = context.getSelectableSubscriptionInfoList()
val subInfos = repository.getSelectableSubscriptionInfoList()
assertThat(subInfos.map { it.subscriptionId }).containsExactly(SUB_ID_IN_SLOT_0)
}
@@ -184,7 +184,7 @@ class SubscriptionRepositoryTest {
)
}
val subInfos = context.getSelectableSubscriptionInfoList()
val subInfos = repository.getSelectableSubscriptionInfoList()
assertThat(subInfos.map { it.subscriptionId }).containsExactly(SUB_ID_3_NOT_IN_SLOT)
}