Merge "Prevents users from being added if device is not provisioned" into nyc-dev

This commit is contained in:
Udam Saini
2016-03-31 20:13:39 +00:00
committed by Android (Google) Code Review
6 changed files with 15 additions and 13 deletions

View File

@@ -339,9 +339,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
setIfOnlyAvailableForAdmins(true);
if (isUiRestricted()
|| Settings.Global.getInt(getActivity().getContentResolver(),
Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
if (isUiRestricted() || !Utils.isDeviceProvisioned(getActivity())) {
// Block access to developer options if the user is not the owner, if user policy
// restricts it, or if the device has not been provisioned
mUnavailable = true;