Updater: Retrieve recovery update setting using the prop itself
This makes it easier to share the setting with SetupWizard. Change-Id: I9a69df99c1b9a198ef9d5a039a090721b0195064
This commit is contained in:
committed by
Rashed Abdel-Tawab
parent
a3c6c19a5f
commit
9689a6b8bb
@@ -434,7 +434,8 @@ public class UpdatesActivity extends UpdatesListActivity {
|
|||||||
// Might be the case of A-only devices using prebuilt vendor images.
|
// Might be the case of A-only devices using prebuilt vendor images.
|
||||||
updateRecovery.setVisibility(View.GONE);
|
updateRecovery.setVisibility(View.GONE);
|
||||||
} else if (Utils.isRecoveryUpdateExecPresent()) {
|
} else if (Utils.isRecoveryUpdateExecPresent()) {
|
||||||
updateRecovery.setChecked(prefs.getBoolean(Constants.PREF_UPDATE_RECOVERY, false));
|
updateRecovery.setChecked(
|
||||||
|
SystemProperties.getBoolean(Constants.UPDATE_RECOVERY_PROPERTY, false));
|
||||||
} else {
|
} else {
|
||||||
// There is no recovery updater script in the device, so the feature is considered
|
// There is no recovery updater script in the device, so the feature is considered
|
||||||
// forcefully enabled, just to avoid users to be confused and complain that
|
// forcefully enabled, just to avoid users to be confused and complain that
|
||||||
@@ -469,8 +470,6 @@ public class UpdatesActivity extends UpdatesListActivity {
|
|||||||
dataWarning.isChecked())
|
dataWarning.isChecked())
|
||||||
.putBoolean(Constants.PREF_AB_PERF_MODE,
|
.putBoolean(Constants.PREF_AB_PERF_MODE,
|
||||||
abPerfMode.isChecked())
|
abPerfMode.isChecked())
|
||||||
.putBoolean(Constants.PREF_UPDATE_RECOVERY,
|
|
||||||
updateRecovery.isChecked())
|
|
||||||
.apply();
|
.apply();
|
||||||
|
|
||||||
if (Utils.isUpdateCheckEnabled(this)) {
|
if (Utils.isUpdateCheckEnabled(this)) {
|
||||||
|
@@ -34,7 +34,6 @@ public final class Constants {
|
|||||||
public static final String PREF_AB_PERF_MODE = "ab_perf_mode";
|
public static final String PREF_AB_PERF_MODE = "ab_perf_mode";
|
||||||
public static final String PREF_MOBILE_DATA_WARNING = "pref_mobile_data_warning";
|
public static final String PREF_MOBILE_DATA_WARNING = "pref_mobile_data_warning";
|
||||||
public static final String PREF_NEEDS_REBOOT_ID = "needs_reboot_id";
|
public static final String PREF_NEEDS_REBOOT_ID = "needs_reboot_id";
|
||||||
public static final String PREF_UPDATE_RECOVERY = "update_recovery";
|
|
||||||
|
|
||||||
public static final String UNCRYPT_FILE_EXT = ".uncrypt";
|
public static final String UNCRYPT_FILE_EXT = ".uncrypt";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user