summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/dialpad/DialpadFragment.java
diff options
context:
space:
mode:
authorIhab Awad <ihab@google.com>2014-03-18 16:19:00 -0700
committerIhab Awad <ihab@google.com>2014-03-20 11:14:13 -0700
commitfb00cb8395f99842a41fd68980b2e87ae840c617 (patch)
treed2febd883785598d84a3f294d7b0046636df8b23 /src/com/android/dialer/dialpad/DialpadFragment.java
parentf3db08a45846fd7a99460ea4eb4e10fa58499cd1 (diff)
Fix problem where swiping upward in overflow menu did not display the
correct options menu items. b/13441681 Change-Id: If4f6970a4dd92e20ab1c04eae5228a0475bf445c
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java11
1 files changed, 5 insertions, 6 deletions
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;
}
/**