summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DevelopmentSettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r--src/com/android/settings/DevelopmentSettings.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index a30dba2..b5b89cb 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -519,6 +519,15 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
removePreference(COLOR_TEMPERATURE_KEY);
mColorTemperaturePreference = null;
}
+
+ if (!getResources().getBoolean(R.bool.config_enableRecoveryUpdater)) {
+ removePreference(mUpdateRecovery);
+ mUpdateRecovery = null;
+ if (SystemProperties.getBoolean(UPDATE_RECOVERY_PROPERTY, false)) {
+ SystemProperties.set(UPDATE_RECOVERY_PROPERTY, "false");
+ pokeSystemProperties();
+ }
+ }
}
private ListPreference addListPreference(String prefKey) {
@@ -754,7 +763,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
updateRootAccessOptions();
updateAdvancedRebootOptions();
updateDevelopmentShortcutOptions();
- updateUpdateRecoveryOptions();
+ if (mUpdateRecovery != null) {
+ updateUpdateRecoveryOptions();
+ }
if (mColorTemperaturePreference != null) {
updateColorTemperature();
}
@@ -830,7 +841,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
resetAdbNotifyOptions();
resetVerifyAppsOverUsbOptions();
resetDevelopmentShortcutOptions();
- resetUpdateRecoveryOptions();
+ if (mUpdateRecovery != null) {
+ resetUpdateRecoveryOptions();
+ }
writeAnimationScaleOption(0, mWindowAnimationScale, null);
writeAnimationScaleOption(1, mTransitionAnimationScale, null);
writeAnimationScaleOption(2, mAnimatorDurationScale, null);
@@ -1855,8 +1868,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
}
}
- public static void initializeUpdateRecoveryOption() {
- if (TextUtils.isEmpty(SystemProperties.get(UPDATE_RECOVERY_PROPERTY))) {
+ public static void initializeUpdateRecoveryOption(Context context) {
+ if (TextUtils.isEmpty(SystemProperties.get(UPDATE_RECOVERY_PROPERTY)) &&
+ context.getResources().getBoolean(R.bool.config_enableRecoveryUpdater)) {
resetUpdateRecoveryOptions();
}
}