summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-02-04 17:12:11 -0800
committerAndrew Lee <anwlee@google.com>2015-02-04 18:42:30 -0800
commit5781d3568539f42aa35283633d5fced851cc7be9 (patch)
treed57959b5525a4a8d6f6a99d7dc077ce35cac9b7d /src
parent8c01471f7e173d2fea84b047087289943193b531 (diff)
Set adapter's query string to restore state.
Before, the adapter was losing the query string on rotation, when the fragment and adapter were torn down and then restored. As such, when setQueryString in the adapter was called, the formatted query string would be null and it would not show the shortcuts. Bug: 18634760 Change-Id: I7f29636b7d035b9b41ba81f3fdb626bf1fa26dd5
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/SmartDialSearchFragment.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/dialer/list/SmartDialSearchFragment.java b/src/com/android/dialer/list/SmartDialSearchFragment.java
index 4f0ce7216..6c521147e 100644
--- a/src/com/android/dialer/list/SmartDialSearchFragment.java
+++ b/src/com/android/dialer/list/SmartDialSearchFragment.java
@@ -38,11 +38,10 @@ public class SmartDialSearchFragment extends SearchFragment {
SmartDialNumberListAdapter adapter = new SmartDialNumberListAdapter(getActivity());
adapter.setUseCallableUri(super.usesCallableUri());
adapter.setQuickContactEnabled(true);
- // Disable the direct call shortcut for the smart dial fragment, since the call button
- // will already be showing anyway.
+ // Disable the direct call shortcut. The call button will already be showing.
adapter.setShortcutEnabled(SmartDialNumberListAdapter.SHORTCUT_DIRECT_CALL, false);
- adapter.setShortcutEnabled(SmartDialNumberListAdapter.SHORTCUT_ADD_NUMBER_TO_CONTACTS,
- false);
+ // Set adapter's query string to restore previous instance state.
+ adapter.setQueryString(getQueryString());
return adapter;
}