From 823f074a73cfc23c40a7b576c71daa096ee9ed6a Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Wed, 21 Sep 2011 17:17:01 -0700 Subject: 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 --- policy/src/com/android/internal/policy/impl/PhoneWindow.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'policy/src/com/android/internal') 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); -- cgit v1.1