Loading res/drawable/ic_hardware_switch.xml 0 → 100644 +17 −0 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> res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ <string name="home_answer_call_summary">Answer incoming calls by pressing the home button</string> <string name="extras_title">Extras</string> <string name="additional_buttons_title">Additional buttons</string> <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> <string name="click_partial_screenshot_title">Click to partial screenshot</string> <string name="click_partial_screenshot_summary">Short click Volume Down and Power to take partial screenshot</string> Loading res/xml/button_settings.xml +15 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,21 @@ </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" > Loading src/org/lineageos/lineageparts/input/ButtonSettings.java +9 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ public class ButtonSettings extends SettingsPreferenceFragment "click_partial_screenshot"; private static final String KEY_SWAP_CAPACITIVE_KEYS = "swap_capacitive_keys"; 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"; Loading @@ -108,6 +109,7 @@ 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; Loading Loading @@ -178,6 +180,7 @@ 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); Loading @@ -200,6 +203,12 @@ 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( Loading Loading
res/drawable/ic_hardware_switch.xml 0 → 100644 +17 −0 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>
res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,9 @@ <string name="home_answer_call_summary">Answer incoming calls by pressing the home button</string> <string name="extras_title">Extras</string> <string name="additional_buttons_title">Additional buttons</string> <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> <string name="click_partial_screenshot_title">Click to partial screenshot</string> <string name="click_partial_screenshot_summary">Short click Volume Down and Power to take partial screenshot</string> Loading
res/xml/button_settings.xml +15 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,21 @@ </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" > Loading
src/org/lineageos/lineageparts/input/ButtonSettings.java +9 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ public class ButtonSettings extends SettingsPreferenceFragment "click_partial_screenshot"; private static final String KEY_SWAP_CAPACITIVE_KEYS = "swap_capacitive_keys"; 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"; Loading @@ -108,6 +109,7 @@ 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; Loading Loading @@ -178,6 +180,7 @@ 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); Loading @@ -200,6 +203,12 @@ 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( Loading