diff options
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 0cfa703..66db6c1 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -233,7 +233,8 @@ public class DevelopmentSettings extends PreferenceFragment addPreferencesFromResource(R.xml.development_prefs); mEnableAdb = findAndInitCheckboxPref(ENABLE_ADB); - mAdbNotify = findAndInitCheckboxPref(ADB_NOTIFY); + mAdbNotify = (CheckBoxPreference) findPreference(ADB_NOTIFY); + mAllPrefs.add(mAdbNotify); mBugreport = findPreference(BUGREPORT); mBugreportInPower = findAndInitCheckboxPref(BUGREPORT_IN_POWER_KEY); mAdbOverNetwork = findAndInitCheckboxPref(ADB_TCPIP); @@ -253,7 +254,8 @@ public class DevelopmentSettings extends PreferenceFragment mDebugAppPref = findPreference(DEBUG_APP_KEY); mAllPrefs.add(mDebugAppPref); mWaitForDebugger = findAndInitCheckboxPref(WAIT_FOR_DEBUGGER_KEY); - mVerifyAppsOverUsb = findAndInitCheckboxPref(VERIFY_APPS_OVER_USB_KEY); + mVerifyAppsOverUsb = (CheckBoxPreference) findPreference(VERIFY_APPS_OVER_USB_KEY); + mAllPrefs.add(mVerifyAppsOverUsb); if (!showVerifierSetting()) { PreferenceGroup debugDebuggingCategory = (PreferenceGroup) findPreference(DEBUG_DEBUGGING_CATEGORY_KEY); @@ -497,11 +499,6 @@ public class DevelopmentSettings extends PreferenceFragment updateAdvancedRebootOptions(); } - private void resetAdvancedRebootOptions() { - Settings.Secure.putInt(getActivity().getContentResolver(), - Settings.Secure.ADVANCED_REBOOT, 0); - } - private void writeAdvancedRebootOptions() { Settings.Secure.putInt(getActivity().getContentResolver(), Settings.Secure.ADVANCED_REBOOT, @@ -552,7 +549,8 @@ public class DevelopmentSettings extends PreferenceFragment } resetDebuggerOptions(); resetRootAccessOptions(); - resetAdvancedRebootOptions(); + resetAdbNotifyOptions(); + resetVerifyAppsOverUsbOptions(); writeAnimationScaleOption(0, mWindowAnimationScale, null); writeAnimationScaleOption(1, mTransitionAnimationScale, null); writeAnimationScaleOption(2, mAnimatorDurationScale, null); @@ -604,6 +602,11 @@ public class DevelopmentSettings extends PreferenceFragment updateRootAccessOptions(); } + private void resetAdbNotifyOptions() { + Settings.Secure.putInt(getActivity().getContentResolver(), + Settings.Secure.ADB_NOTIFY, 1); + } + private void updateHdcpValues() { int index = 1; // Defaults to drm-only. Needs to match with R.array.hdcp_checking_values ListPreference hdcpChecking = (ListPreference) findPreference(HDCP_CHECKING_KEY); @@ -686,6 +689,11 @@ public class DevelopmentSettings extends PreferenceFragment } } + private void resetVerifyAppsOverUsbOptions() { + Settings.Global.putInt(getActivity().getContentResolver(), + Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 1); + } + private void updateVerifyAppsOverUsbOptions() { updateCheckBox(mVerifyAppsOverUsb, Settings.Global.getInt(getActivity().getContentResolver(), Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 1) != 0); |