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

Verified Commit 4f5c9590 authored by Manu Suresh's avatar Manu Suresh
Browse files

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 059ab858.
parent 4ea181c4
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:tint="?android:attr/colorControlNormal"
    android:height="24dp"
    android:width="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960">
    <group
        android:pivotX="480"
        android:pivotY="480"
        android:rotation="90">
        <path
            android:fillColor="#d8ff4f"
            android:pathData="M201,600q-53,0 -86.5,-33.5T81,480q0,-53 33.5,-86.5T201,360h558q53,0 86.5,33.5T879,480q0,53 -33.5,86.5T759,600L201,600ZM566,540h197q26,0 43,-17t17,-43q0,-34 -17,-47t-43,-13L566,420v120Z"
            android:fillType="evenOdd"/>
    </group>
</vector>
+0 −5
Original line number Diff line number Diff line
@@ -27,9 +27,4 @@

    <!-- OpenKeyChain -->
    <string name="openkeychain_title">OpenKeychain</string>

    <!-- Hardware Switch -->
    <string name="hardware_switch_category_title">Hardware switch</string>
    <string name="hardware_switch_title">Hardware switch</string>
    <string name="hardware_switch_summary">Configure the hardware switch</string>
</resources>
+0 −15
Original line number Diff line number Diff line
@@ -90,21 +90,6 @@

    </PreferenceCategory>

    <PreferenceCategory
        android:key="hardware_switch_category"
        android:title="@string/hardware_switch_category_title" >

        <lineageos.preference.RemotePreference
            android:key="hardware_switch"
            android:title="@string/hardware_switch_title"
            android:summary="@string/hardware_switch_summary"
            android:icon="@drawable/ic_hardware_switch"
            lineage:requiresAction="org.lineageos.settings.device.HARDWARE_SWITCH_SETTINGS">
            <intent android:action="org.lineageos.settings.device.HARDWARE_SWITCH_SETTINGS" />
        </lineageos.preference.RemotePreference>

    </PreferenceCategory>

    <PreferenceCategory
        android:key="power_key"
        android:title="@string/hardware_keys_power_key_title" >
+0 −9
Original line number Diff line number Diff line
@@ -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(