Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9689a6b8 authored by Alessandro Astone's avatar Alessandro Astone Committed by Rashed Abdel-Tawab
Browse files

Updater: Retrieve recovery update setting using the prop itself

This makes it easier to share the setting with SetupWizard.

Change-Id: I9a69df99c1b9a198ef9d5a039a090721b0195064
parent a3c6c19a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -434,7 +434,8 @@ public class UpdatesActivity extends UpdatesListActivity {
            // Might be the case of A-only devices using prebuilt vendor images.
            updateRecovery.setVisibility(View.GONE);
        } else if (Utils.isRecoveryUpdateExecPresent()) {
            updateRecovery.setChecked(prefs.getBoolean(Constants.PREF_UPDATE_RECOVERY, false));
            updateRecovery.setChecked(
                    SystemProperties.getBoolean(Constants.UPDATE_RECOVERY_PROPERTY, false));
        } else {
            // 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
@@ -469,8 +470,6 @@ public class UpdatesActivity extends UpdatesListActivity {
                                    dataWarning.isChecked())
                            .putBoolean(Constants.PREF_AB_PERF_MODE,
                                    abPerfMode.isChecked())
                            .putBoolean(Constants.PREF_UPDATE_RECOVERY,
                                    updateRecovery.isChecked())
                            .apply();

                    if (Utils.isUpdateCheckEnabled(this)) {
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ public final class Constants {
    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_NEEDS_REBOOT_ID = "needs_reboot_id";
    public static final String PREF_UPDATE_RECOVERY = "update_recovery";

    public static final String UNCRYPT_FILE_EXT = ".uncrypt";