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

Commit 6457aac3 authored by Josep del Río's avatar Josep del Río Committed by Android (Google) Code Review
Browse files

Merge "Fix all apps key" into main

parents 38c9cab4 3c616053
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -2090,8 +2090,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    "Home - Long Press");
            switch (mLongPressOnHomeBehavior) {
                case LONG_PRESS_HOME_ALL_APPS:
                    logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS);
                    if (mHasFeatureLeanback) {
                        launchAllAppsAction();
                        logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS);
                    } else {
                        launchAllAppsViaA11y();
                        logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS);
                    }
                    break;
                case LONG_PRESS_HOME_ASSIST:
                    logKeyboardSystemsEvent(event, KeyboardLogEvent.LAUNCH_ASSISTANT);
@@ -3683,12 +3688,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                }
                break;
            case KeyEvent.KEYCODE_ALL_APPS:
                if (!down) {
                if (firstDown) {
                    if (mHasFeatureLeanback) {
                        mHandler.removeMessages(MSG_HANDLE_ALL_APPS);
                        Message msg = mHandler.obtainMessage(MSG_HANDLE_ALL_APPS);
                        msg.setAsynchronous(true);
                        msg.sendToTarget();
                        logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS);
                    } else {
                        launchAllAppsViaA11y();
                        logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS);
                    }
                }
                return true;
            case KeyEvent.KEYCODE_NOTIFICATION:
+10 −8
Original line number Diff line number Diff line
@@ -132,8 +132,9 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase {
                        KeyboardLogEvent.VOLUME_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN, 0},
                {"VOLUME_MUTE key -> Mute Volume", new int[]{KeyEvent.KEYCODE_VOLUME_MUTE},
                        KeyboardLogEvent.VOLUME_MUTE, KeyEvent.KEYCODE_VOLUME_MUTE, 0},
                {"ALL_APPS key -> Open App Drawer", new int[]{KeyEvent.KEYCODE_ALL_APPS},
                        KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0},
                {"ALL_APPS key -> Open App Drawer in Accessibility mode",
                        new int[]{KeyEvent.KEYCODE_ALL_APPS},
                        KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0},
                {"SEARCH key -> Launch Search Activity", new int[]{KeyEvent.KEYCODE_SEARCH},
                        KeyboardLogEvent.LAUNCH_SEARCH, KeyEvent.KEYCODE_SEARCH, 0},
                {"LANGUAGE_SWITCH key -> Switch Keyboard Language",
@@ -259,14 +260,15 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase {
                {"Long press META + H -> Launch assistant",
                        new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ASSIST,
                        KeyboardLogEvent.LAUNCH_ASSISTANT, KeyEvent.KEYCODE_H, META_ON},
                {"Long press HOME key -> Open App Drawer",
                {"Long press HOME key -> Open App Drawer in Accessibility mode",
                        new int[]{KeyEvent.KEYCODE_HOME}, LONG_PRESS_HOME_ALL_APPS,
                        KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_HOME, 0},
                {"Long press META + ENTER -> Open App Drawer",
                        KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_HOME, 0},
                {"Long press META + ENTER -> Open App Drawer in Accessibility mode",
                        new int[]{META_KEY, KeyEvent.KEYCODE_ENTER}, LONG_PRESS_HOME_ALL_APPS,
                        KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON},
                {"Long press META + H -> Open App Drawer", new int[]{META_KEY, KeyEvent.KEYCODE_H},
                        LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS,
                        KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON},
                {"Long press META + H -> Open App Drawer in Accessibility mode",
                        new int[]{META_KEY, KeyEvent.KEYCODE_H},
                        LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS,
                        KeyEvent.KEYCODE_H, META_ON}};
    }