summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DeviceInfoSettings.java
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2015-11-09 11:35:42 -0800
committerThe Android Automerger <android-build@google.com>2015-12-01 17:41:41 -0800
commitda91ef8b9a77edf99ef1c5f28071911549750c85 (patch)
treeffd94f8f0e96d4075314d3ed7d16a9760ba842ab /src/com/android/settings/DeviceInfoSettings.java
parent46742e0cf933abfcf65be9009cd9262863280c34 (diff)
downloadpackages_apps_Settings-da91ef8b9a77edf99ef1c5f28071911549750c85.zip
packages_apps_Settings-da91ef8b9a77edf99ef1c5f28071911549750c85.tar.gz
packages_apps_Settings-da91ef8b9a77edf99ef1c5f28071911549750c85.tar.bz2
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
Diffstat (limited to 'src/com/android/settings/DeviceInfoSettings.java')
-rw-r--r--src/com/android/settings/DeviceInfoSettings.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index a839216..8fc41ea 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -228,6 +228,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;