summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DevelopmentSettings.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-08-07 11:49:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-07 11:49:15 -0700
commitf621435eafcb46f69b35b8a6b8119ab87801e9ef (patch)
tree897e1dc4c4784dbd95caaf3f1c78d5ec4e7df1bb /src/com/android/settings/DevelopmentSettings.java
parent9effd146114364c91d44b9a44ade761b69bdd1cf (diff)
parent2d803a3931797891a30158c1a912ce775049f974 (diff)
downloadpackages_apps_settings-f621435eafcb46f69b35b8a6b8119ab87801e9ef.zip
packages_apps_settings-f621435eafcb46f69b35b8a6b8119ab87801e9ef.tar.gz
packages_apps_settings-f621435eafcb46f69b35b8a6b8119ab87801e9ef.tar.bz2
Merge "Add dev setting to enable global actions bug report button." into jb-mr1-dev
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r--src/com/android/settings/DevelopmentSettings.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 7d82863..fc1b096 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -79,6 +79,7 @@ public class DevelopmentSettings extends PreferenceFragment
private static final String ENFORCE_READ_EXTERNAL = "enforce_read_external";
private static final String LOCAL_BACKUP_PASSWORD = "local_backup_password";
private static final String HARDWARE_UI_PROPERTY = "persist.sys.ui.hw";
+ private static final String BUGREPORT_IN_POWER_KEY = "bugreport_in_power";
private static final String DEBUG_APP_KEY = "debug_app";
private static final String WAIT_FOR_DEBUGGER_KEY = "wait_for_debugger";
@@ -119,6 +120,7 @@ public class DevelopmentSettings extends PreferenceFragment
private boolean mDontPokeProperties;
private CheckBoxPreference mEnableAdb;
+ private CheckBoxPreference mBugreportInPower;
private CheckBoxPreference mKeepScreenOn;
private CheckBoxPreference mEnforceReadExternal;
private CheckBoxPreference mAllowMockLocation;
@@ -172,6 +174,7 @@ public class DevelopmentSettings extends PreferenceFragment
addPreferencesFromResource(R.xml.development_prefs);
mEnableAdb = findAndInitCheckboxPref(ENABLE_ADB);
+ mBugreportInPower = findAndInitCheckboxPref(BUGREPORT_IN_POWER_KEY);
mKeepScreenOn = findAndInitCheckboxPref(KEEP_SCREEN_ON);
mEnforceReadExternal = findAndInitCheckboxPref(ENFORCE_READ_EXTERNAL);
mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION);
@@ -336,6 +339,8 @@ public class DevelopmentSettings extends PreferenceFragment
mHaveDebugSettings = false;
updateCheckBox(mEnableAdb, Settings.Secure.getInt(cr,
Settings.Secure.ADB_ENABLED, 0) != 0);
+ updateCheckBox(mBugreportInPower, Settings.Secure.getInt(cr,
+ Settings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0);
updateCheckBox(mKeepScreenOn, Settings.System.getInt(cr,
Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
updateCheckBox(mEnforceReadExternal, isPermissionEnforced(READ_EXTERNAL_STORAGE));
@@ -823,6 +828,10 @@ public class DevelopmentSettings extends PreferenceFragment
Settings.Secure.putInt(getActivity().getContentResolver(),
Settings.Secure.ADB_ENABLED, 0);
}
+ } else if (preference == mBugreportInPower) {
+ Settings.Secure.putInt(getActivity().getContentResolver(),
+ Settings.Secure.BUGREPORT_IN_POWER_MENU,
+ mBugreportInPower.isChecked() ? 1 : 0);
} else if (preference == mKeepScreenOn) {
Settings.System.putInt(getActivity().getContentResolver(),
Settings.System.STAY_ON_WHILE_PLUGGED_IN,