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

Commit fe407ed2 authored by Marcos Marado's avatar Marcos Marado Committed by Adnan Begovic
Browse files

Settings: last app action in long press

Change-Id: I72d9cb5bca5eedd20ea80ee69d370a478e59def4
parent 64734065
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -102,9 +102,11 @@
        <item>@string/hardware_keys_action_in_app_search</item>
        <item>@string/hardware_keys_action_launch_camera</item>
        <item>@string/hardware_keys_action_sleep</item>
        <item>@string/hardware_keys_action_last_app</item>
    </string-array>

    <string-array name="hardware_keys_action_values" translatable="false">
        <!-- must match src/com/android/settings/ButtonSettings.java //-->
        <item>0</item>
        <item>1</item>
        <item>2</item>
@@ -113,6 +115,7 @@
        <item>5</item>
        <item>6</item>
        <item>7</item>
        <item>8</item>
    </string-array>

    <!-- Volume key cursor control -->
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@
    <string name="hardware_keys_action_in_app_search">In-app search</string>
    <string name="hardware_keys_action_launch_camera">Launch camera</string>
    <string name="hardware_keys_action_sleep">Turn screen off</string>
    <string name="hardware_keys_action_last_app">Last app</string>
    <string name="volbtn_cursor_control_title">Keyboard cursor control</string>
    <string name="volbtn_cursor_control_off">Disabled</string>
    <string name="volbtn_cursor_control_on">Volume up/down moves cursor left/right</string>
+4 −4
Original line number Diff line number Diff line
@@ -78,8 +78,8 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
    private static final int ACTION_VOICE_SEARCH = 4;
    private static final int ACTION_IN_APP_SEARCH = 5;
    private static final int ACTION_LAUNCH_CAMERA = 6;
    private static final int ACTION_LAST_APP = 7;
    private static final int ACTION_SLEEP = 8;
    private static final int ACTION_SLEEP = 7;
    private static final int ACTION_LAST_APP = 8;

    // Masks for checking presence of hardware keys.
    // Must match values in frameworks/base/core/res/res/values/config.xml
@@ -185,14 +185,14 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
            int defaultLongPressAction = res.getInteger(
                    com.android.internal.R.integer.config_longPressOnHomeBehavior);
            if (defaultLongPressAction < ACTION_NOTHING ||
                    defaultLongPressAction > ACTION_SLEEP) {
                    defaultLongPressAction > ACTION_LAST_APP) {
                defaultLongPressAction = ACTION_NOTHING;
            }

            int defaultDoubleTapAction = res.getInteger(
                    com.android.internal.R.integer.config_doubleTapOnHomeBehavior);
            if (defaultDoubleTapAction < ACTION_NOTHING ||
                    defaultDoubleTapAction > ACTION_SLEEP) {
                    defaultDoubleTapAction > ACTION_LAST_APP) {
                defaultDoubleTapAction = ACTION_NOTHING;
            }