Loading src/com/android/settings/network/SimOnboardingActivity.kt +6 −21 Original line number Diff line number Diff line Loading @@ -328,20 +328,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { @Composable fun ErrorDialogImpl(){ // EuiccSlotSidecar showErrorDialog val errorDialogPresenterForEuiccSlotSidecar = rememberAlertDialogPresenter( confirmButton = AlertDialogButton( stringResource(android.R.string.ok) ) { finish() }, title = stringResource(R.string.privileged_action_disable_fail_title), text = { Text(stringResource(R.string.privileged_action_disable_fail_text)) }, ) // RemovableSlotSidecar showErrorDialog val errorDialogPresenterForRemovableSlotSidecar = rememberAlertDialogPresenter( val errorDialogPresenterForSimSwitching = rememberAlertDialogPresenter( confirmButton = AlertDialogButton( stringResource(android.R.string.ok) ) { Loading @@ -368,8 +355,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { // show error when (showError.value) { ErrorType.ERROR_EUICC_SLOT -> errorDialogPresenterForEuiccSlotSidecar.open() ErrorType.ERROR_REMOVABLE_SLOT -> errorDialogPresenterForRemovableSlotSidecar.open() ErrorType.ERROR_SIM_SWITCHING -> errorDialogPresenterForSimSwitching.open() ErrorType.ERROR_ENABLE_DSDS -> errorDialogPresenterForMultiSimSidecar.open() else -> {} } Loading Loading @@ -455,7 +441,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { SidecarFragment.State.ERROR -> { Log.i(TAG, "Failed to enable the eSIM profile.") switchToEuiccSubscriptionSidecar!!.reset() showError.value = ErrorType.ERROR_EUICC_SLOT showError.value = ErrorType.ERROR_SIM_SWITCHING callbackListener(CallbackType.CALLBACK_ERROR) } } Loading @@ -475,7 +461,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { SidecarFragment.State.ERROR -> { Log.e(TAG, "Failed switching to removable slot.") switchToRemovableSlotSidecar!!.reset() showError.value = ErrorType.ERROR_REMOVABLE_SLOT showError.value = ErrorType.ERROR_SIM_SWITCHING callbackListener(CallbackType.CALLBACK_ERROR) } } Loading Loading @@ -605,9 +591,8 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { enum class ErrorType(val value:Int){ ERROR_NONE(-1), ERROR_EUICC_SLOT(1), ERROR_REMOVABLE_SLOT(2), ERROR_ENABLE_DSDS(3) ERROR_SIM_SWITCHING(1), ERROR_ENABLE_DSDS(2) } enum class CallbackType(val value:Int){ Loading src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -252,8 +252,8 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc mSwitchToEuiccSubscriptionSidecar.reset(); dismissProgressDialog(); showErrorDialog( getString(R.string.privileged_action_disable_fail_title), getString(R.string.privileged_action_disable_fail_text)); getString(R.string.sim_action_enable_sim_fail_title), getString(R.string.sim_action_enable_sim_fail_text)); break; } } Loading Loading
src/com/android/settings/network/SimOnboardingActivity.kt +6 −21 Original line number Diff line number Diff line Loading @@ -328,20 +328,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { @Composable fun ErrorDialogImpl(){ // EuiccSlotSidecar showErrorDialog val errorDialogPresenterForEuiccSlotSidecar = rememberAlertDialogPresenter( confirmButton = AlertDialogButton( stringResource(android.R.string.ok) ) { finish() }, title = stringResource(R.string.privileged_action_disable_fail_title), text = { Text(stringResource(R.string.privileged_action_disable_fail_text)) }, ) // RemovableSlotSidecar showErrorDialog val errorDialogPresenterForRemovableSlotSidecar = rememberAlertDialogPresenter( val errorDialogPresenterForSimSwitching = rememberAlertDialogPresenter( confirmButton = AlertDialogButton( stringResource(android.R.string.ok) ) { Loading @@ -368,8 +355,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { // show error when (showError.value) { ErrorType.ERROR_EUICC_SLOT -> errorDialogPresenterForEuiccSlotSidecar.open() ErrorType.ERROR_REMOVABLE_SLOT -> errorDialogPresenterForRemovableSlotSidecar.open() ErrorType.ERROR_SIM_SWITCHING -> errorDialogPresenterForSimSwitching.open() ErrorType.ERROR_ENABLE_DSDS -> errorDialogPresenterForMultiSimSidecar.open() else -> {} } Loading Loading @@ -455,7 +441,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { SidecarFragment.State.ERROR -> { Log.i(TAG, "Failed to enable the eSIM profile.") switchToEuiccSubscriptionSidecar!!.reset() showError.value = ErrorType.ERROR_EUICC_SLOT showError.value = ErrorType.ERROR_SIM_SWITCHING callbackListener(CallbackType.CALLBACK_ERROR) } } Loading @@ -475,7 +461,7 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { SidecarFragment.State.ERROR -> { Log.e(TAG, "Failed switching to removable slot.") switchToRemovableSlotSidecar!!.reset() showError.value = ErrorType.ERROR_REMOVABLE_SLOT showError.value = ErrorType.ERROR_SIM_SWITCHING callbackListener(CallbackType.CALLBACK_ERROR) } } Loading Loading @@ -605,9 +591,8 @@ class SimOnboardingActivity : SpaBaseDialogActivity() { enum class ErrorType(val value:Int){ ERROR_NONE(-1), ERROR_EUICC_SLOT(1), ERROR_REMOVABLE_SLOT(2), ERROR_ENABLE_DSDS(3) ERROR_SIM_SWITCHING(1), ERROR_ENABLE_DSDS(2) } enum class CallbackType(val value:Int){ Loading
src/com/android/settings/network/telephony/ToggleSubscriptionDialogActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -252,8 +252,8 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc mSwitchToEuiccSubscriptionSidecar.reset(); dismissProgressDialog(); showErrorDialog( getString(R.string.privileged_action_disable_fail_title), getString(R.string.privileged_action_disable_fail_text)); getString(R.string.sim_action_enable_sim_fail_title), getString(R.string.sim_action_enable_sim_fail_text)); break; } } Loading