summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-10-26 14:16:42 -0700
committerAndrew Lee <anwlee@google.com>2015-10-26 14:18:39 -0700
commit88fe8be5a8836cb8ac3125db26d1dcc327abd3e2 (patch)
tree6eb86af70906c69267bfe82c63b2badf0b1dbc0a
parent8aa0a941f872b491e19a7afec43141973019d455 (diff)
Show list of all phone numbers for empty query.
+ Configure BlockedListSearchFragment so it will not show empty when the search query is null. + Removed local reference and equality check for changes in the query string. This is done in the superclasses already, so was redundant. - Removed unnecessary override in RegularSearchFragment. Bug: 24910704 Change-Id: Ifd11eed9e3ba6fb00ba535ae019df477f81518fb
-rw-r--r--src/com/android/dialer/list/BlockedListSearchFragment.java12
-rw-r--r--src/com/android/dialer/list/RegularSearchFragment.java5
2 files changed, 5 insertions, 12 deletions
diff --git a/src/com/android/dialer/list/BlockedListSearchFragment.java b/src/com/android/dialer/list/BlockedListSearchFragment.java
index 961ce39e6..8fc6f7adb 100644
--- a/src/com/android/dialer/list/BlockedListSearchFragment.java
+++ b/src/com/android/dialer/list/BlockedListSearchFragment.java
@@ -48,7 +48,6 @@ public class BlockedListSearchFragment extends RegularSearchFragment
private FilteredNumberAsyncQueryHandler mFilteredNumberAsyncQueryHandler;
private EditText mSearchView;
- private String mSearchQuery;
private final TextWatcher mPhoneSearchQueryTextListener = new TextWatcher() {
@Override
@@ -57,12 +56,7 @@ public class BlockedListSearchFragment extends RegularSearchFragment
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- final String newText = s.toString();
- if (newText.equals(mSearchQuery)) {
- return;
- }
- mSearchQuery = newText;
- setQueryString(mSearchQuery, false);
+ setQueryString(s.toString(), false);
}
@Override
@@ -86,6 +80,10 @@ public class BlockedListSearchFragment extends RegularSearchFragment
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
+ // Show list of all phone numbers when search query is empty.
+ setShowEmptyListForNullQuery(false);
+
mFilteredNumberAsyncQueryHandler = new FilteredNumberAsyncQueryHandler(
getContext().getContentResolver());
}
diff --git a/src/com/android/dialer/list/RegularSearchFragment.java b/src/com/android/dialer/list/RegularSearchFragment.java
index 6b89ef0a3..ed88d8355 100644
--- a/src/com/android/dialer/list/RegularSearchFragment.java
+++ b/src/com/android/dialer/list/RegularSearchFragment.java
@@ -60,11 +60,6 @@ public class RegularSearchFragment extends SearchFragment
AnalyticsUtil.sendScreenView(this);
}
- @Override
- public void onDetach() {
- super.onDetach();
- }
-
public void configureDirectorySearch() {
setDirectorySearchEnabled(true);
setDirectoryResultLimit(SEARCH_DIRECTORY_RESULT_LIMIT);