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

@@ -50,7 +50,7 @@ public class EraseEuiccDataController extends BasePreferenceController {
if (!TextUtils.equals(preference.getKey(), getPreferenceKey())) {
return false;
}
if (SubscriptionUtil.shouldShowRacDialog(mContext)) {
if (SubscriptionUtil.shouldShowRacDialogWhenErasingAllEsims(mContext)) {
EuiccRacConnectivityDialogFragment.show(mHostFragment);
} else {
EraseEuiccDataDialogFragment.show(mHostFragment);