Prevents users from being added if device is not provisioned
Also added a utility function for checking provisioning, instead of repeating code for this check in several places. bug:26156445 Change-Id: I9f4a280dd0cdf889f892e386dbf6a3fdb2a052ef
This commit is contained in:
@@ -68,8 +68,7 @@ public class MasterClearConfirm extends InstrumentedFragment {
|
||||
getActivity().getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
|
||||
|
||||
if (pdbManager != null && !pdbManager.getOemUnlockEnabled() &&
|
||||
Settings.Global.getInt(getActivity().getContentResolver(),
|
||||
Settings.Global.DEVICE_PROVISIONED, 0) != 0) {
|
||||
Utils.isDeviceProvisioned(getActivity())) {
|
||||
// if OEM unlock is enabled, this will be wiped during FR process. If disabled, it
|
||||
// will be wiped here, unless the device is still being provisioned, in which case
|
||||
// the persistent data block will be preserved.
|
||||
|
Reference in New Issue
Block a user