From 81a313dfd824a4aafe86e636c537a08bae0c1e0b Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 1 Jun 2015 14:53:59 -0700 Subject: Enter search UI even if dialpad is not animating This fixes a UI bug that happens when the dialpad is displayed without animation. Bug: 21524134 Change-Id: Ic566b09c2839d7f34d5d983f67e592c1b2d50d2e --- src/com/android/dialer/DialtactsActivity.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 214f3206e..dc091ebf4 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -166,9 +166,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O AnimationListenerAdapter mSlideInListener = new AnimationListenerAdapter() { @Override public void onAnimationEnd(Animation animation) { - if (!isInSearchUi()) { - enterSearchUi(true /* isSmartDial */, mSearchQuery, false); - } + maybeEnterSearchUi(); } }; @@ -703,6 +701,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mFloatingActionButtonController.scaleOut(); } else { mFloatingActionButtonController.setVisible(false); + maybeEnterSearchUi(); } mActionBarController.onDialpadUp(); @@ -1038,6 +1037,12 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } } + private void maybeEnterSearchUi() { + if (!isInSearchUi()) { + enterSearchUi(true /* isSmartDial */, mSearchQuery, false); + } + } + /** * @return True if the search UI was exited, false otherwise */ -- cgit v1.2.3