diff options
author | Andrew Lee <anwlee@google.com> | 2014-09-22 17:13:11 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-09-22 17:13:11 -0700 |
commit | 62e1d70e9779bd120b5fb9d5e89d952b5ef9ab6b (patch) | |
tree | 385de75c4d5fcbaa5357f7fc1d89b5e4b7244eff /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | f2d3bd5d0fc9fd8e28f440fce7489691e0aee46b (diff) |
Hide the FAB if the dialpad chooser is shown.
This bug was happening because in onHiddenChanged, the dialpad button
was being made to be shown. Now, only reveal the fab at that point if
the dialpad chooser is not visible.
There is some slight quirk... I would have thought that checking
!mDialpadChooser.isShown() should have been sufficient, but it
returns false at that point. The isDialpadChooserVisible check
works fine.
Bug: 17609779
Change-Id: I11eb3dc81a2849874202a3ea06e40c097b50ac9a
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 9eb68847a..91b222f3c 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -225,7 +225,7 @@ public class DialpadFragment extends AnalyticsFragment public void onCallStateChanged(int state, String incomingNumber) { // Log.i(TAG, "PhoneStateListener.onCallStateChanged: " // + state + ", '" + incomingNumber + "'"); - if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) { + if ((state == TelephonyManager.CALL_STATE_IDLE) && isDialpadChooserVisible()) { // Log.i(TAG, "Call ended with dialpad chooser visible! Taking it down..."); // Note there's a race condition in the UI here: the // dialpad chooser could conceivably disappear (on its @@ -1211,7 +1211,7 @@ public class DialpadFragment extends AnalyticsFragment } if (enabled) { - // Log.i(TAG, "Showing dialpad chooser!"); + Log.i(TAG, "Showing dialpad chooser!"); if (mDialpadView != null) { mDialpadView.setVisibility(View.GONE); } @@ -1226,7 +1226,7 @@ public class DialpadFragment extends AnalyticsFragment } mDialpadChooser.setAdapter(mDialpadChooserAdapter); } else { - // Log.i(TAG, "Displaying normal Dialer UI."); + Log.i(TAG, "Displaying normal Dialer UI."); if (mDialpadView != null) { mDialpadView.setVisibility(View.VISIBLE); } else { @@ -1241,7 +1241,7 @@ public class DialpadFragment extends AnalyticsFragment /** * @return true if we're currently showing the "dialpad chooser" UI. */ - private boolean dialpadChooserVisible() { + private boolean isDialpadChooserVisible() { return mDialpadChooser.getVisibility() == View.VISIBLE; } @@ -1604,7 +1604,7 @@ public class DialpadFragment extends AnalyticsFragment final DialtactsActivity activity = (DialtactsActivity) getActivity(); final DialpadView dialpadView = (DialpadView) getView().findViewById(R.id.dialpad_view); if (activity == null) return; - if (!hidden) { + if (!hidden && !isDialpadChooserVisible()) { if (mAnimate) { dialpadView.animateShow(); } |