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

Commit 00b43361 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow menu to hide upon pressing ESC." into rvc-dev

parents 7a61fb6a 8e90d0ab
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
import android.util.Pair;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -225,6 +226,15 @@ public class PipMenuActivity extends Activity {
        getWindow().setExitTransition(null);
    }

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_ESCAPE) {
            hideMenu();
            return true;
        }
        return super.onKeyUp(keyCode, event);
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);