diff options
author | Adam Powell <adamp@google.com> | 2011-01-23 16:09:54 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-23 16:09:54 -0800 |
commit | 8ccea78c01a6098e96189799b46b72cbfeba7bae (patch) | |
tree | 7c9a2ec11de327eb16043b833c50afddacea43b7 /policy | |
parent | 9d97b63d0e0c7c9deb2d140c1dd579b51f52c1af (diff) | |
parent | e571e60a3d49443b6caf4cd29ccd01ffd9ef3ad3 (diff) | |
download | frameworks_base-8ccea78c01a6098e96189799b46b72cbfeba7bae.zip frameworks_base-8ccea78c01a6098e96189799b46b72cbfeba7bae.tar.gz frameworks_base-8ccea78c01a6098e96189799b46b72cbfeba7bae.tar.bz2 |
Merge "Fix bug 3299208 - Some apps' dialogs aren't show()ing successfully" into honeycomb
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 13 |
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 c313713..6a1d199 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; |