From 70c1eb70ad1f8ba2e933328d2447382e82a8dd32 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Tue, 17 Oct 2017 17:26:00 -0700 Subject: Update SearchAdapter query if fragment has query before fragment is ready. If a user made a search using the voice/mic icon, the search results weren't being applied to on device contacts because SearchAdapter wasn't receiving the query. Bug: 67633975 Test: manual PiperOrigin-RevId: 172540423 Change-Id: Ib92b055dddf4e4fbdf88eadd62583bf1bac32055 --- java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 1 + 1 file changed, 1 insertion(+) (limited to 'java') diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index 6115c2f1c..254453508 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -125,6 +125,7 @@ public final class NewSearchFragment extends Fragment LayoutInflater inflater, @Nullable ViewGroup parent, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_search, parent, false); adapter = new SearchAdapter(getActivity(), new SearchCursorManager()); + adapter.setQuery(query); adapter.setCallInitiationType(callInitiationType); adapter.setSearchActions(getActions()); adapter.setZeroSuggestVisible(getArguments().getBoolean(KEY_SHOW_ZERO_SUGGEST)); -- cgit v1.2.3