From 10c93827c3603e51a1e9373a7fb55b37f4e60487 Mon Sep 17 00:00:00 2001 From: Naoki Amano Date: Tue, 13 Sep 2016 18:56:57 +0900 Subject: Fixed Dial fab changed to add to contact when multiwindow mode Added check whether DialtactActivity is in search mode or not. Change-Id: I621a9f6b2a419a3cfaa0f2e3e117b41143cdcce8 --- src/com/android/dialer/DialtactsActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index d063fef5a..441501cfd 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -627,7 +627,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O int resId = view.getId(); if (resId == R.id.floating_action_button) { if (mListsFragment.getCurrentTabIndex() - == ListsFragment.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch) { + == ListsFragment.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch && + !mInDialpadSearch) { DialerUtils.startActivityWithErrorToast( this, IntentUtil.getNewContactIntent(), @@ -1342,7 +1343,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O updateMissedCalls(); int tabIndex = mListsFragment.getCurrentTabIndex(); mPreviouslySelectedTabIndex = tabIndex; - if (tabIndex == ListsFragment.TAB_INDEX_ALL_CONTACTS) { + if (tabIndex == ListsFragment.TAB_INDEX_ALL_CONTACTS && + !mInRegularSearch && !mInDialpadSearch) { mFloatingActionButtonController.changeIcon( getResources().getDrawable(R.drawable.ic_person_add_24dp), getResources().getString(R.string.search_shortcut_create_new_contact)); -- cgit v1.2.3