From fb00cb8395f99842a41fd68980b2e87ae840c617 Mon Sep 17 00:00:00 2001 From: Ihab Awad Date: Tue, 18 Mar 2014 16:19:00 -0700 Subject: Fix problem where swiping upward in overflow menu did not display the correct options menu items. b/13441681 Change-Id: If4f6970a4dd92e20ab1c04eae5228a0475bf445c --- src/com/android/dialer/dialpad/DialpadFragment.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/com/android/dialer/dialpad') diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 7762721a1..2d3c0ee32 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -936,18 +936,17 @@ public class DialpadFragment extends Fragment } /** - * Called by the containing Activity to tell this Fragment that the gesture to display the - * "options" menu has been invoked. + * Called by the containing Activity to tell this Fragment to build an overflow options + * menu for display by the container when appropriate. * * @param invoker the View that invoked the options menu, to act as an anchor location. */ - public void optionsMenuInvoked(View invoker) { + public PopupMenu buildOptionsMenu(View invoker) { final PopupMenu popupMenu = new PopupMenu(getActivity(), invoker); - final Menu menu = popupMenu.getMenu(); popupMenu.inflate(R.menu.dialpad_options); popupMenu.setOnMenuItemClickListener(this); - setupMenuItems(menu); - popupMenu.show(); + setupMenuItems(popupMenu.getMenu()); + return popupMenu; } /** -- cgit v1.2.3