Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31bb97d2 authored by Adam Powell's avatar Adam Powell
Browse files

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
parent f3cd1d95
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;