diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-19 00:28:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-19 00:28:58 +0000 |
commit | 479382a2203d7e26b53e0d2e19f936ec6432d586 (patch) | |
tree | 0aacd85dd55bd03870f54e2f14911338f3883c1b /java/com/android/dialer/searchfragment/list/SearchAdapter.java | |
parent | b615f7b460de730094af948e9827a9a1017ce1fd (diff) | |
parent | df06af5411002174c6aeb653ca7790f202284de6 (diff) |
Merge "Now persist state through configuration changes in Search."
Diffstat (limited to 'java/com/android/dialer/searchfragment/list/SearchAdapter.java')
-rw-r--r-- | java/com/android/dialer/searchfragment/list/SearchAdapter.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/com/android/dialer/searchfragment/list/SearchAdapter.java b/java/com/android/dialer/searchfragment/list/SearchAdapter.java index 61055a0c1..3bfdd98f3 100644 --- a/java/com/android/dialer/searchfragment/list/SearchAdapter.java +++ b/java/com/android/dialer/searchfragment/list/SearchAdapter.java @@ -111,8 +111,11 @@ public final class SearchAdapter extends RecyclerView.Adapter<ViewHolder> } public void setContactsCursor(SearchCursor cursor) { - searchCursorManager.setContactsCursor(cursor); - notifyDataSetChanged(); + if (searchCursorManager.setContactsCursor(cursor)) { + // Since this is a new contacts cursor, we need to reapply the filter. + searchCursorManager.setQuery(query); + notifyDataSetChanged(); + } } void clear() { |