findPreference(DEBUG_DEBUGGING_CATEGORY_KEY);
mEnableAdb = findAndInitSwitchPref(ENABLE_ADB);
- mAdbNotify = findAndInitSwitchPref(ADB_NOTIFY);
+ mAdbNotify = (SwitchPreference) findPreference(ADB_NOTIFY);
mAllPrefs.add(mAdbNotify);
mAdbOverNetwork = findAndInitSwitchPref(ADB_TCPIP);
mMockLocationAppPref = findPreference(MOCK_LOCATION_APP_KEY);
mAllPrefs.add(mMockLocationAppPref);
- mVerifyAppsOverUsb = findAndInitSwitchPref(VERIFY_APPS_OVER_USB_KEY);
+ mVerifyAppsOverUsb = (SwitchPreference) findPreference(VERIFY_APPS_OVER_USB_KEY);
+ mAllPrefs.add(mVerifyAppsOverUsb);
if (!showVerifierSetting()) {
if (debugDebuggingCategory != null) {
debugDebuggingCategory.removePreference(mVerifyAppsOverUsb);
resetDebuggerOptions();
writeLogdSizeOption(null);
resetRootAccessOptions();
+ resetAdbNotifyOptions();
+ resetVerifyAppsOverUsbOptions();
resetDevelopmentShortcutOptions();
resetUpdateRecoveryOptions();
writeAnimationScaleOption(0, mWindowAnimationScale, null);
updateRootAccessOptions();
}
+ private void resetAdbNotifyOptions() {
+ CMSettings.Secure.putInt(getActivity().getContentResolver(),
+ CMSettings.Secure.ADB_NOTIFY, 1);
+ }
+
private void updateStayAwakeOptions() {
int index = Settings.Global.getInt(getActivity().getContentResolver(),
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0);
Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, mVerifyAppsOverUsb.isChecked() ? 1 : 0);
}
+ private void resetVerifyAppsOverUsbOptions() {
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 1);
+ }
+
private boolean enableVerifierSetting() {
final ContentResolver cr = getActivity().getContentResolver();
if (Settings.Global.getInt(cr, Settings.Global.ADB_ENABLED, 0) == 0) {