Don't show "Wipe eSIMs" checkbox for developers.

Per UX review feedback, it doesn't make sense to show this just
because someone has developer options turned on. So only show it if
the user has ever downloaded an eSIM profile.

Change-Id: If474451dddcaa75bce1e57ce2f1751ef3adf45ee
Test: TreeHugger
Fixes: 63147904
This commit is contained in:
Jeff Davidson
2017-06-30 18:02:13 -07:00
parent 32a8568230
commit 4ba7478fdf
2 changed files with 7 additions and 32 deletions

View File

@@ -247,9 +247,8 @@ public class MasterClear extends OptionsMenuFragment
/**
* Whether to show the checkbox to wipe the eUICC.
*
* <p>We show the checkbox on any device which supports eUICC as long as either the eUICC was
* ever provisioned (that is, at least one profile was ever downloaded onto it), or if the user
* has enabled development mode.
* <p>We show the checkbox on any device which supports eUICC as long as the eUICC was ever
* provisioned (that is, at least one profile was ever downloaded onto it).
*/
@VisibleForTesting
boolean showWipeEuicc() {
@@ -258,8 +257,7 @@ public class MasterClear extends OptionsMenuFragment
return false;
}
ContentResolver cr = context.getContentResolver();
return Settings.Global.getInt(cr, Settings.Global.EUICC_PROVISIONED, 0) != 0
|| Settings.Global.getInt(cr, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
return Settings.Global.getInt(cr, Settings.Global.EUICC_PROVISIONED, 0) != 0;
}
@VisibleForTesting