From bff84d90c5854d3dd23fd550e5311cd31b32bfb0 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 20 Aug 2014 11:15:25 -0700 Subject: Fix for overflow menu disappearing during rotation Bug: 17146511 Change-Id: I101b9839a0626dea8ba89d82e3487f8c4654723d --- src/com/android/dialer/dialpad/DialpadFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 ce6c46daa..84f1c64bf 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -650,11 +650,14 @@ public class DialpadFragment extends AnalyticsFragment mSmsPackageComponentName = DialerUtils.getSmsComponent(activity); + // Populate the overflow menu in onResume instead of onCreate, so that if the SMS activity + // is disabled while Dialer is paused, the "Send a text message" option can be correctly + // removed when resumed. mOverflowMenuButton = mDialpadView.getOverflowMenuButton(); mOverflowPopupMenu = buildOptionsMenu(mOverflowMenuButton); mOverflowMenuButton.setOnTouchListener(mOverflowPopupMenu.getDragToOpenListener()); mOverflowMenuButton.setOnClickListener(this); - mOverflowMenuButton.setVisibility(View.INVISIBLE); + mOverflowMenuButton.setVisibility(isDigitsEmpty() ? View.INVISIBLE : View.VISIBLE); } @Override -- cgit v1.2.3