diff options
| author | 2020-02-26 14:57:14 -0800 | |
|---|---|---|
| committer | 2020-02-26 14:57:14 -0800 | |
| commit | 8e90d0ab6e7baa29b1ceb66f13bb6dca411f04a4 (patch) | |
| tree | 29d73b38b2d9d01b37931e11d3e3eb5d0831e1d1 | |
| parent | 1e1f821146fe4efaa6a242f2de0a393281642141 (diff) | |
Allow menu to hide upon pressing ESC.
Bug: 126619417
Test: Press ESC
Change-Id: I8f1550b45742e7f2055004fa805a8e2f97387144
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java index 81e8a0b91211..fc04f795c056 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java @@ -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; @@ -226,6 +227,15 @@ public class PipMenuActivity extends Activity { } @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); updateFromIntent(intent); |