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:
@@ -219,8 +219,12 @@ class SimOnboardingService {
|
||||
return renameMutableMap[subInfo.subscriptionId] ?: subInfo.displayName.toString()
|
||||
}
|
||||
|
||||
fun addCurrentItemForSelectedSim(){
|
||||
fun addCurrentItemForSelectedSim() {
|
||||
if (userSelectedSubInfoList.size < getActiveModemCount) {
|
||||
userSelectedSubInfoList.addAll(activeSubInfoList)
|
||||
Log.d(TAG, "addCurrentItemForSelectedSim: userSelectedSubInfoList:" +
|
||||
", $userSelectedSubInfoList")
|
||||
}
|
||||
}
|
||||
|
||||
fun addItemForSelectedSim(selectedSubInfo: SubscriptionInfo) {
|
||||
|
@@ -24,6 +24,7 @@ import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.navigation.NavHostController
|
||||
import androidx.navigation.NavType
|
||||
@@ -101,10 +102,13 @@ fun PageImpl(onboardingService:SimOnboardingService,navHostController: NavHostCo
|
||||
) {
|
||||
composable(route = SimOnboardingScreen.LabelSim.name) {
|
||||
val nextPage =
|
||||
if (onboardingService.isMultipleEnabledProfilesSupported && onboardingService.isAllOfSlotAssigned) {
|
||||
if (onboardingService.isMultipleEnabledProfilesSupported
|
||||
&& onboardingService.isAllOfSlotAssigned) {
|
||||
SimOnboardingScreen.SelectSim.name
|
||||
} else {
|
||||
LaunchedEffect(Unit) {
|
||||
onboardingService.addCurrentItemForSelectedSim()
|
||||
}
|
||||
SimOnboardingScreen.PrimarySim.name
|
||||
}
|
||||
SimOnboardingLabelSimImpl(
|
||||
|
Reference in New Issue
Block a user