Fix bug 5217267 - Action bars and menu shortcuts

Don't try to "close" the menu after completing a shortcut action if an
action bar is present.

Change-Id: I54a75543cf9a52e3186ff464924a0b37d0b20b9d
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index e2d6c5f..b69a7c2 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -888,7 +888,8 @@
             // Mark as handled
             st.isHandled = true;
 
-            if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0) {
+            // Only close down the menu if we don't have an action bar keeping it open.
+            if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0 && mActionBar == null) {
                 closePanel(st, true);
             }
         }
@@ -909,7 +910,10 @@
 
         boolean res = st.menu.performIdentifierAction(id, flags);
 
-        closePanel(st, true);
+        // Only close down the menu if we don't have an action bar keeping it open.
+        if (mActionBar == null) {
+            closePanel(st, true);
+        }
 
         return res;
     }