summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/lineageos/updater/UpdatesActivity.java10
-rw-r--r--src/org/lineageos/updater/controller/ABUpdateInstaller.java6
-rw-r--r--src/org/lineageos/updater/misc/Constants.java1
3 files changed, 4 insertions, 13 deletions
diff --git a/src/org/lineageos/updater/UpdatesActivity.java b/src/org/lineageos/updater/UpdatesActivity.java
index 44b922c..b66f35c 100644
--- a/src/org/lineageos/updater/UpdatesActivity.java
+++ b/src/org/lineageos/updater/UpdatesActivity.java
@@ -481,18 +481,12 @@ public class UpdatesActivity extends UpdatesListActivity {
Spinner autoCheckInterval = view.findViewById(R.id.preferences_auto_updates_check_interval);
SwitchCompat autoDelete = view.findViewById(R.id.preferences_auto_delete_updates);
SwitchCompat dataWarning = view.findViewById(R.id.preferences_mobile_data_warning);
- SwitchCompat abPerfMode = view.findViewById(R.id.preferences_ab_perf_mode);
SwitchCompat updateRecovery = view.findViewById(R.id.preferences_update_recovery);
- if (!Utils.isABDevice()) {
- abPerfMode.setVisibility(View.GONE);
- }
-
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
autoCheckInterval.setSelection(Utils.getUpdateCheckSetting(this));
autoDelete.setChecked(prefs.getBoolean(Constants.PREF_AUTO_DELETE_UPDATES, false));
dataWarning.setChecked(prefs.getBoolean(Constants.PREF_MOBILE_DATA_WARNING, true));
- abPerfMode.setChecked(prefs.getBoolean(Constants.PREF_AB_PERF_MODE, false));
if (getResources().getBoolean(R.bool.config_hideRecoveryUpdate)) {
// Hide the update feature if explicitly requested.
@@ -531,7 +525,6 @@ public class UpdatesActivity extends UpdatesListActivity {
autoCheckInterval.getSelectedItemPosition())
.putBoolean(Constants.PREF_AUTO_DELETE_UPDATES, autoDelete.isChecked())
.putBoolean(Constants.PREF_MOBILE_DATA_WARNING, dataWarning.isChecked())
- .putBoolean(Constants.PREF_AB_PERF_MODE, abPerfMode.isChecked())
.apply();
if (Utils.isUpdateCheckEnabled(this)) {
@@ -542,8 +535,7 @@ public class UpdatesActivity extends UpdatesListActivity {
}
if (Utils.isABDevice()) {
- boolean enableABPerfMode = abPerfMode.isChecked();
- mUpdaterService.getUpdaterController().setPerformanceMode(enableABPerfMode);
+ mUpdaterService.getUpdaterController().setPerformanceMode(true);
}
if (Utils.isRecoveryUpdateExecPresent()) {
boolean enableRecoveryUpdate = updateRecovery.isChecked();
diff --git a/src/org/lineageos/updater/controller/ABUpdateInstaller.java b/src/org/lineageos/updater/controller/ABUpdateInstaller.java
index 9fdc75e..59c9c9c 100644
--- a/src/org/lineageos/updater/controller/ABUpdateInstaller.java
+++ b/src/org/lineageos/updater/controller/ABUpdateInstaller.java
@@ -203,9 +203,9 @@ class ABUpdateInstaller {
}
}
- boolean enableABPerfMode = PreferenceManager.getDefaultSharedPreferences(mContext)
- .getBoolean(Constants.PREF_AB_PERF_MODE, false);
- mUpdateEngine.setPerformanceMode(enableABPerfMode);
+ if (Utils.isABDevice()) {
+ mUpdateEngine.setPerformanceMode(true);
+ }
String zipFileUri = "file://" + file.getAbsolutePath();
mUpdateEngine.applyPayload(zipFileUri, offset, 0, headerKeyValuePairs);
diff --git a/src/org/lineageos/updater/misc/Constants.java b/src/org/lineageos/updater/misc/Constants.java
index 7147dab..47c0d2c 100644
--- a/src/org/lineageos/updater/misc/Constants.java
+++ b/src/org/lineageos/updater/misc/Constants.java
@@ -31,7 +31,6 @@ public final class Constants {
public static final String PREF_LAST_UPDATE_CHECK = "last_update_check";
public static final String PREF_AUTO_UPDATES_CHECK_INTERVAL = "auto_updates_check_interval";
public static final String PREF_AUTO_DELETE_UPDATES = "auto_delete_updates";
- 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";