summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-06-17 00:35:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-16 15:39:47 +0000
commit091732a2da10ab574d1a37cda07c5293e90c255c (patch)
tree91e13a70cef0dc48b9674534acb2bd6f64f77b43
parentc3660b7b53c47c055bdf472f7bb00fb90f3a6b16 (diff)
parent9fd8f25659185a031b2a7c6120da899e54e41127 (diff)
Merge "Exit search UI when dialpad is hidden if no smart dial results."
-rw-r--r--src/com/android/dialer/DialtactsActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 6144bb5af..d48b28e72 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -59,7 +59,6 @@ import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.PopupMenu;
-import android.widget.RelativeLayout;
import android.widget.Toast;
import com.android.contacts.common.CallUtil;
@@ -69,7 +68,6 @@ import com.android.contacts.common.dialog.ClearFrequentsDialog;
import com.android.contacts.common.dialog.SelectSIMDialogFragment;
import com.android.contacts.common.interactions.ImportExportDialogFragment;
import com.android.contacts.common.list.OnPhoneNumberPickerActionListener;
-import com.android.contacts.common.util.ViewUtil;
import com.android.contacts.common.widget.FloatingActionButtonController;
import com.android.dialer.calllog.CallLogActivity;
import com.android.dialer.database.DialerDatabaseHelper;
@@ -964,7 +962,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
@Override
public void onBackPressed() {
if (mIsDialpadShown) {
- if (TextUtils.isEmpty(mSearchQuery)) {
+ if (TextUtils.isEmpty(mSearchQuery) ||
+ (mSmartDialSearchFragment != null && mSmartDialSearchFragment.isVisible()
+ && mSmartDialSearchFragment.getAdapter().getCount() == 0)) {
exitSearchUi();
}
hideDialpadFragment(true, false);