summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-10-13 16:15:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-13 16:15:17 -0700
commitfb99c53308955d34b3eadae325b7ed60576836f8 (patch)
treef2ded538d7d1adabcd54bc18dddc6a3dbef7227c
parent3fda6ed3c751d959d93dc9fb6d3b65f3617d04f5 (diff)
parent50b15348c5b61472b5ed02434968b5a035765b63 (diff)
downloadframeworks_base-fb99c53308955d34b3eadae325b7ed60576836f8.zip
frameworks_base-fb99c53308955d34b3eadae325b7ed60576836f8.tar.gz
frameworks_base-fb99c53308955d34b3eadae325b7ed60576836f8.tar.bz2
am 50b15348: Merge "Bug 5312828 - Menu button not responding" into ics-mr0
* commit '50b15348c5b61472b5ed02434968b5a035765b63': Bug 5312828 - Menu button not responding
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index de8d41a2..af86ae9 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -349,8 +349,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
}
// Already prepared (isPrepared will be reset to false later)
- if (st.isPrepared)
+ if (st.isPrepared) {
return true;
+ }
if ((mPreparedPanel != null) && (mPreparedPanel != st)) {
// Another Panel is prepared and possibly open, so close it
@@ -800,14 +801,23 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
closePanel(st, true);
} else if (st.isPrepared) {
+ boolean show = true;
+ if (st.refreshMenuContent) {
+ // Something may have invalidated the menu since we prepared it.
+ // Re-prepare it to refresh.
+ st.isPrepared = false;
+ show = preparePanel(st, event);
+ }
- // Write 'menu opened' to event log
- EventLog.writeEvent(50001, 0);
+ if (show) {
+ // Write 'menu opened' to event log
+ EventLog.writeEvent(50001, 0);
- // Show menu
- openPanel(st, event);
+ // Show menu
+ openPanel(st, event);
- playSoundEffect = true;
+ playSoundEffect = true;
+ }
}
}