diff options
author | Adam Powell <adamp@google.com> | 2011-09-21 17:17:01 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-09-21 17:21:47 -0700 |
commit | 823f074a73cfc23c40a7b576c71daa096ee9ed6a (patch) | |
tree | 0ad49dc344b4395247ce90346054b9c0901a7098 /policy | |
parent | a80599f5be394edd9f3918ba03c490850a1d9e7f (diff) | |
download | frameworks_base-823f074a73cfc23c40a7b576c71daa096ee9ed6a.zip frameworks_base-823f074a73cfc23c40a7b576c71daa096ee9ed6a.tar.gz frameworks_base-823f074a73cfc23c40a7b576c71daa096ee9ed6a.tar.bz2 |
Fix bug 5300621 - Share menu disappears in gallery
ActionProviders (or action views) unfortunately had no way to report
that they had opened a sub-UI that would affect menu visibility
listeners used to hide action bars when not in use. This caused the
Gallery UI to hide its action bar when the share popup was open.
Add hidden API (to be made public later) to ActionProvider that can be
used to inform the menu system that a sub UI has opened or
closed. Account for this in menu visibility callbacks. Fix
ShareActionProvider to use this when its popup windows open and close.
Fix a regression where submenus were not properly reporting visibility
changes.
Change-Id: Ia6f45fb463ad106105c40d01f141c2e5c8b96f78
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 1b7271d..5281946 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -3470,6 +3470,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } public boolean onOpenSubMenu(MenuBuilder subMenu) { + if (subMenu == null) return false; + // Set a simple callback for the submenu subMenu.setCallback(this); |