[Settings][Back port] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion. Bug: 240515161 Test: test cases and local testing Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d Change-Id: I866b2dd566ffa9953f2a83aa3dcb32440390898a
This commit is contained in:
@@ -64,6 +64,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.core.InstrumentedFragment;
|
||||
import com.android.settings.enterprise.ActionDisabledByAdminDialogHelper;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settings.password.ChooseLockSettingsHelper;
|
||||
import com.android.settings.password.ConfirmLockPattern;
|
||||
import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
@@ -381,6 +382,14 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis
|
||||
mScrollView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to show any UI which is SIM related.
|
||||
*/
|
||||
@VisibleForTesting
|
||||
boolean showAnySubscriptionInfo(Context context) {
|
||||
return (context != null) && SubscriptionUtil.isSimHardwareVisible(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to show strings indicating that the eUICC will be wiped.
|
||||
*
|
||||
@@ -390,7 +399,7 @@ public class MainClear extends InstrumentedFragment implements OnGlobalLayoutLis
|
||||
@VisibleForTesting
|
||||
boolean showWipeEuicc() {
|
||||
Context context = getContext();
|
||||
if (!isEuiccEnabled(context)) {
|
||||
if (!showAnySubscriptionInfo(context) || !isEuiccEnabled(context)) {
|
||||
return false;
|
||||
}
|
||||
ContentResolver cr = context.getContentResolver();
|
||||
|
Reference in New Issue
Block a user