summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-01-23 17:00:52 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-23 17:00:52 -0800
commit02b74a07de57962b52ea62d7347d68bc7f079a05 (patch)
tree402d703c353ef75205fc27233a29c83a2194f190 /policy
parent0a10bab2b939deb18d2295b7c831a219cdfaf7ae (diff)
parentb2d7b02c4f3e2a43e65985edc70db52e257dd673 (diff)
downloadframeworks_base-02b74a07de57962b52ea62d7347d68bc7f079a05.zip
frameworks_base-02b74a07de57962b52ea62d7347d68bc7f079a05.tar.gz
frameworks_base-02b74a07de57962b52ea62d7347d68bc7f079a05.tar.bz2
am b2d7b02c: am 8ccea78c: Merge "Fix bug 3299208 - Some apps\' dialogs aren\'t show()ing successfully" into honeycomb
* commit 'b2d7b02c4f3e2a43e65985edc70db52e257dd673': Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 546c7c3..76554a7 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -885,15 +885,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
final Menu parentMenu = subMenu.getRootMenu();
final PanelFeatureState panel = findMenuPanel(parentMenu);
- /*
- * Use the panel open state to determine whether this is coming from an open panel
- * or an action button. If it's an open panel we want to use MenuDialogHelper.
- * If it's closed we want to grab the relevant view and create a popup anchored to it.
- */
- if (panel.isOpen) {
- // The window manager will give us a valid window token
- new MenuDialogHelper(subMenu).show(null);
- } else if (hasFeature(FEATURE_ACTION_BAR)) {
+ if (hasFeature(FEATURE_ACTION_BAR) && panel.featureId == FEATURE_OPTIONS_PANEL) {
mDecor.post(new Runnable() {
public void run() {
mActionButtonPopup = new ActionButtonSubmenu(getContext(), subMenu);
@@ -904,6 +896,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
}
});
+ } else {
+ // The window manager will give us a valid window token
+ new MenuDialogHelper(subMenu).show(null);
}
return true;