Extract and fix logic for showing rac dialog.

Added tests to make sure the logic makes sense.

Bug: 335745726
Test: make, manual, atest SubscriptionUtilRoboTest, atest SubscriptionUtilTest, atest ResetNetworkTest
Change-Id: I7092f2747f1ca1f9ef4dc99275a916b9e24d8b28
This commit is contained in:
Rafael Higuera Silva
2024-04-23 17:31:23 +00:00
parent c6005fb22a
commit 36d99e8b09
5 changed files with 87 additions and 13 deletions

View File

@@ -158,7 +158,7 @@ public class ResetNetwork extends InstrumentedFragment {
.setTitleRes(R.string.reset_mobile_network_settings_confirm_title)
.setSourceMetricsCategory(getMetricsCategory());
if (resetSims && SubscriptionUtil.shouldShowRacDialog(context)) {
if (resetSims && SubscriptionUtil.shouldShowRacDialogWhenErasingAllEsims(context)) {
context.startActivity(
EuiccRacConnectivityDialogActivity.getIntent(context, launcher.toIntent()));
} else {