summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-06-14 00:43:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-12 05:34:42 +0000
commit005865ae517fb9737617bcfb22447638ac3f269e (patch)
tree57aa74c236c45d0c6942d91fdf32d8c1688bf400
parent4351555b89deea2a37607e159c4419ca85d492e3 (diff)
parenta851542c69872ffa6c5615fd8cdd1381f1b13b93 (diff)
Merge "Clear fragments properly when search term is erased."
-rw-r--r--src/com/android/dialer/DialtactsActivity.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 19af4ef91..f5a2d3ed5 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -310,9 +310,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
}
}
- if (mIsDialpadShown && mSmartDialSearchFragment != null) {
+ if (mSmartDialSearchFragment != null && mSmartDialSearchFragment.isVisible()) {
mSmartDialSearchFragment.setQueryString(mSearchQuery, false /* delaySelection */);
- } else if (mRegularSearchFragment != null) {
+ } else if (mRegularSearchFragment != null && mRegularSearchFragment.isVisible()) {
mRegularSearchFragment.setQueryString(mSearchQuery, false /* delaySelection */);
}
}
@@ -550,13 +550,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mDialpadFragment.dialButtonPressed();
}
break;
- case R.id.search_close_button:
- // Clear the search field
- if (!TextUtils.isEmpty(mSearchView.getText())) {
- mDialpadFragment.clearDialpad();
- mSearchView.setText(null);
- }
- break;
case R.id.voice_search_button:
try {
startActivityForResult(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),