Fix PrimarySim show the same sim in the preference list

Bug: 327425969
Test: manual test, verify the UI
Change-Id: I0d3c2163a43a00ec0e4e627b34281e95cc611751
This commit is contained in:
songferngwang
2024-02-28 21:40:07 +00:00
parent 09603308d4
commit bb7360b148
2 changed files with 12 additions and 4 deletions

View File

@@ -219,8 +219,12 @@ class SimOnboardingService {
return renameMutableMap[subInfo.subscriptionId] ?: subInfo.displayName.toString()
}
fun addCurrentItemForSelectedSim(){
userSelectedSubInfoList.addAll(activeSubInfoList)
fun addCurrentItemForSelectedSim() {
if (userSelectedSubInfoList.size < getActiveModemCount) {
userSelectedSubInfoList.addAll(activeSubInfoList)
Log.d(TAG, "addCurrentItemForSelectedSim: userSelectedSubInfoList:" +
", $userSelectedSubInfoList")
}
}
fun addItemForSelectedSim(selectedSubInfo: SubscriptionInfo) {