Clean up search fragment loader lifecycle.
- Programatically create SearchView to make it always expand across entire action bar. - Store current query text during screen rotation - Restart loader when query text changes Bug: 33354491 Test: RunSettingsRoboTests Change-Id: I63838a38514569aac60c5d67ac52ac06a7acd5a3
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
package com.android.settings.search2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.SearchView;
|
||||
import android.content.Context;
|
||||
import android.view.Menu;
|
||||
|
||||
/**
|
||||
@@ -31,8 +31,14 @@ public interface SearchFeatureProvider {
|
||||
|
||||
/**
|
||||
* Inserts the Menu items into Settings activity.
|
||||
*
|
||||
* @param menu Items will be inserted into this menu.
|
||||
* @param activity The activity that precedes SearchActivity.
|
||||
*/
|
||||
void setUpSearchMenu(Menu menu, Activity activity);
|
||||
|
||||
/**
|
||||
* Returns a new loader to search in index database.
|
||||
*/
|
||||
DatabaseResultLoader getDatabaseSearchLoader(Context context, String query);
|
||||
}
|
||||
|
Reference in New Issue
Block a user