Allow menu to hide upon pressing ESC.
Bug: 126619417 Test: Press ESC Change-Id: I8f1550b45742e7f2055004fa805a8e2f97387144
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user