diff options
author | Adam Powell <adamp@google.com> | 2011-07-27 20:05:14 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-07-27 21:08:28 -0700 |
commit | ccdd4ee44f8cfbb45b2989cca833895fcc4c4225 (patch) | |
tree | 834d4578d847dae767765aa8fca9845ca323a64d /policy/src | |
parent | b6f7a27c59fd170b5d7617e43e21bfd8587f234e (diff) | |
download | frameworks_base-ccdd4ee44f8cfbb45b2989cca833895fcc4c4225.zip frameworks_base-ccdd4ee44f8cfbb45b2989cca833895fcc4c4225.tar.gz frameworks_base-ccdd4ee44f8cfbb45b2989cca833895fcc4c4225.tar.bz2 |
Fix bug 5087980 - MenuItem#expandActionView should work from within
onCreateOptionsMenu
Initialize menu presenters early enough to respond to expanding an
action view within onCreateOptionsMenu.
Have SearchView show the IME as an async post to handle attempts to
show it while the UI is still in initial setup.
Change-Id: I77f3a94ed4397737edb5a7a15bf54993b6723f5e
Diffstat (limited to 'policy/src')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index a4e94ef..174f733 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -343,6 +343,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } + if (mActionBar != null) { + if (mActionMenuPresenterCallback == null) { + mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); + } + mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); + } + // Call callback, and return if it doesn't want to display menu. // Creating the panel menu will involve a lot of manipulation; @@ -356,13 +363,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } st.refreshMenuContent = false; - - if (mActionBar != null) { - if (mActionMenuPresenterCallback == null) { - mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); - } - mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); - } } // Callback and return if the callback does not want to show the menu |