am 50b15348: Merge "Bug 5312828 - Menu button not responding" into ics-mr0
* commit '50b15348c5b61472b5ed02434968b5a035765b63': Bug 5312828 - Menu button not responding
This commit is contained in:
@@ -349,8 +349,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Already prepared (isPrepared will be reset to false later)
|
// Already prepared (isPrepared will be reset to false later)
|
||||||
if (st.isPrepared)
|
if (st.isPrepared) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ((mPreparedPanel != null) && (mPreparedPanel != st)) {
|
if ((mPreparedPanel != null) && (mPreparedPanel != st)) {
|
||||||
// Another Panel is prepared and possibly open, so close it
|
// 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);
|
closePanel(st, true);
|
||||||
|
|
||||||
} else if (st.isPrepared) {
|
} 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
|
if (show) {
|
||||||
EventLog.writeEvent(50001, 0);
|
// Write 'menu opened' to event log
|
||||||
|
EventLog.writeEvent(50001, 0);
|
||||||
|
|
||||||
// Show menu
|
// Show menu
|
||||||
openPanel(st, event);
|
openPanel(st, event);
|
||||||
|
|
||||||
playSoundEffect = true;
|
playSoundEffect = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user