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

Commit 1d976c67 authored by Josep del Rio's avatar Josep del Rio
Browse files

Close floating panels on Launcher when using Escape

This change will make the Escape key close floating panels in
Launcher.

Bug: 280801803
Test: Flashed on device, tried with physical keyboard and panels
will close.

Change-Id: Ie09e57716a7be74638037abe6272b47eec1b8a6c
parent efb0c4e9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3159,6 +3159,16 @@ public class Launcher extends StatefulActivity<LauncherState>
        return super.onKeyShortcut(keyCode, event);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_ESCAPE) {
            // Close any open floating views.
            closeOpenViews();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_MENU) {