Skip to content

Commit 890be6b

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug 5217267 - Action bars and menu shortcuts"
2 parents 5471781 + 6055f3e commit 890be6b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindow.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@ private boolean performPanelShortcut(PanelFeatureState st, int keyCode, KeyEvent
888888
// Mark as handled
889889
st.isHandled = true;
890890

891-
if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0) {
891+
// Only close down the menu if we don't have an action bar keeping it open.
892+
if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0 && mActionBar == null) {
892893
closePanel(st, true);
893894
}
894895
}
@@ -909,7 +910,10 @@ public boolean performPanelIdentifierAction(int featureId, int id, int flags) {
909910

910911
boolean res = st.menu.performIdentifierAction(id, flags);
911912

912-
closePanel(st, true);
913+
// Only close down the menu if we don't have an action bar keeping it open.
914+
if (mActionBar == null) {
915+
closePanel(st, true);
916+
}
913917

914918
return res;
915919
}

0 commit comments

Comments
 (0)