From 4f5c959054d158a3fc5db56fc71b8cfce6bd7b1b Mon Sep 17 00:00:00 2001 From: "manu.suresh" Date: Fri, 6 Mar 2026 11:15:02 +0530 Subject: [PATCH] Revert "LineageParts: Add new PreferenceCategory and RemotePreference for Hardware Switch" * We can overlay this from device-side itself, so remove it from here. This reverts commit 059ab858bc36e2dde5894d08e9becc409dfa2911. --- res/drawable/ic_hardware_switch.xml | 17 ----------------- res/values/e_strings.xml | 5 ----- res/xml/button_settings.xml | 15 --------------- .../lineageparts/input/ButtonSettings.java | 9 --------- 4 files changed, 46 deletions(-) delete mode 100644 res/drawable/ic_hardware_switch.xml diff --git a/res/drawable/ic_hardware_switch.xml b/res/drawable/ic_hardware_switch.xml deleted file mode 100644 index ba19d31d..00000000 --- a/res/drawable/ic_hardware_switch.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/res/values/e_strings.xml b/res/values/e_strings.xml index 1363df3a..5c078ca7 100644 --- a/res/values/e_strings.xml +++ b/res/values/e_strings.xml @@ -27,9 +27,4 @@ OpenKeychain - - - Hardware switch - Hardware switch - Configure the hardware switch diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml index de6f3391..1e49cb98 100644 --- a/res/xml/button_settings.xml +++ b/res/xml/button_settings.xml @@ -90,21 +90,6 @@ - - - - - - - - diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java index a37d6f7f..d340836d 100644 --- a/src/org/lineageos/lineageparts/input/ButtonSettings.java +++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java @@ -101,7 +101,6 @@ public class ButtonSettings extends SettingsPreferenceFragment private static final String KEY_SWAP_CAPACITIVE_KEYS = "swap_capacitive_keys"; private static final String KEY_NAV_BAR_INVERSE = "sysui_nav_bar_inverse"; private static final String KEY_ENABLE_TASKBAR = "enable_taskbar"; - private static final String KEY_HARDWARE_SWITCH = "hardware_switch"; private static final String CATEGORY_POWER = "power_key"; private static final String CATEGORY_HOME = "home_key"; @@ -113,7 +112,6 @@ public class ButtonSettings extends SettingsPreferenceFragment private static final String CATEGORY_VOLUME = "volume_keys"; private static final String CATEGORY_NAVBAR = "navigation_bar_category"; private static final String CATEGORY_EXTRAS = "extras_category"; - private static final String CATEGORY_HARDWARE_SWITCH = "hardware_switch_category"; private ListPreference mBackLongPressAction; private ListPreference mHomeLongPressAction; @@ -187,7 +185,6 @@ public class ButtonSettings extends SettingsPreferenceFragment final PreferenceCategory volumeCategory = prefScreen.findPreference(CATEGORY_VOLUME); final PreferenceCategory cameraCategory = prefScreen.findPreference(CATEGORY_CAMERA); final PreferenceCategory extrasCategory = prefScreen.findPreference(CATEGORY_EXTRAS); - final PreferenceCategory hardwareSwitchCategory = prefScreen.findPreference(CATEGORY_HARDWARE_SWITCH); // Power button ends calls. mPowerEndCall = findPreference(KEY_POWER_END_CALL); @@ -210,12 +207,6 @@ public class ButtonSettings extends SettingsPreferenceFragment mNavigationPreferencesCat = findPreference(CATEGORY_NAVBAR); - Preference hardwareSwitchPref = findPreference(KEY_HARDWARE_SWITCH); - if (hardwareSwitchCategory != null - && (hardwareSwitchPref == null || !hardwareSwitchPref.isVisible())) { - prefScreen.removePreference(hardwareSwitchCategory); - } - Action defaultBackLongPressAction = Action.fromIntSafe(res.getInteger( org.lineageos.platform.internal.R.integer.config_longPressOnBackBehavior)); Action defaultHomeLongPressAction = Action.fromIntSafe(res.getInteger( -- GitLab