diff options
author | Yorke Lee <yorkelee@google.com> | 2014-08-20 11:15:25 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-08-20 11:19:58 -0700 |
commit | bff84d90c5854d3dd23fd550e5311cd31b32bfb0 (patch) | |
tree | d92ff51737517a590a04be62ae44928a415315d3 | |
parent | 68aa63b48a33e461576e40a6dcd937fe846122e1 (diff) |
Fix for overflow menu disappearing during rotation
Bug: 17146511
Change-Id: I101b9839a0626dea8ba89d82e3487f8c4654723d
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 |