Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb7360b1 authored by songferngwang's avatar songferngwang
Browse files

Fix PrimarySim show the same sim in the preference list

Bug: 327425969
Test: manual test, verify the UI
Change-Id: I0d3c2163a43a00ec0e4e627b34281e95cc611751
parent 09603308
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -220,7 +220,11 @@ class SimOnboardingService {
    }

    fun addCurrentItemForSelectedSim() {
        if (userSelectedSubInfoList.size < getActiveModemCount) {
            userSelectedSubInfoList.addAll(activeSubInfoList)
            Log.d(TAG, "addCurrentItemForSelectedSim: userSelectedSubInfoList:" +
                    ", $userSelectedSubInfoList")
        }
    }

    fun addItemForSelectedSim(selectedSubInfo: SubscriptionInfo) {
+6 −2
Original line number Diff line number Diff line
@@ -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(