Block developer settings during SUW
Block access to development settings by tapping on the build number in "About phone". Once SUW has completed, taps will be allowed. Bug: 25290269 Change-Id: I9b2787712237f28fba446abab15a9e1c075d0419
This commit is contained in:
@@ -209,6 +209,12 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
|
||||
// Don't enable developer options for secondary users.
|
||||
if (UserHandle.myUserId() != UserHandle.USER_OWNER) return true;
|
||||
|
||||
// Don't enable developer options until device has been provisioned
|
||||
if (Settings.Global.getInt(getActivity().getContentResolver(),
|
||||
Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
|
||||
if (um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) return true;
|
||||
|
||||
|
Reference in New Issue
Block a user