summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Powell <adamp@google.com> 2011-05-03 20:58:31 -0700
committer Adam Powell <adamp@google.com> 2011-05-03 21:03:24 -0700
commit31bb97d240915d6ead410ab0befd3da115a92282 (patch)
tree0dcc1e03a9882ae13e92d8f60db0c292b94e7568
parentf3cd1d957c0d709a4704722b6397c934c1a770b8 (diff)
Fix bug 4361642 - Action menu unresponsive after orientation change
Through invalidating panel menus and action bar initialization it was possible for instance state restoration to throw out a new menu already in use. Invalidate the menu if it already exists instead. The saved instance state will be applied later if a relevant panel menu is shown. Change-Id: I6bad7640ecb8d2f5f8ea658e1c68b07d52d108b9
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 5d20e6a88d23..d9971093a78d 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -1524,6 +1524,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
st.onRestoreInstanceState(icicles.get(curFeatureId));
+ invalidatePanelMenu(curFeatureId);
}
/*
@@ -3115,9 +3116,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
* The first time the menu is being shown after restoring, the
* Activity.onCreateOptionsMenu should be called. But, if it is the
* same instance then menu != null and we won't call that method.
- * So, clear this. Also clear any cached views.
+ * We clear any cached views here. The caller should invalidatePanelMenu.
*/
- menu = null;
createdPanelView = null;
shownPanelView = null;
decorView = null;