diff options
author | Andrew Lee <anwlee@google.com> | 2014-06-13 17:09:26 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-06-16 17:27:58 -0700 |
commit | 9fd8f25659185a031b2a7c6120da899e54e41127 (patch) | |
tree | 1a90b8820b30df75b513b5a5e834b7206e57cd44 | |
parent | 00a3d5d576d53b43a46849bf40c43bccde44a9b2 (diff) |
Exit search UI when dialpad is hidden if no smart dial results.
Bug: 15471462
Change-Id: Iaa8fd146d69a1c3a28c3106620228b43a6409bdc
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 19af4ef91..de68c8e1f 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; @@ -967,7 +965,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); |