зеркало из https://github.com/mozilla/gecko-dev.git
Bug 917350 - Move loader init() implementation to SearchLoader (r=margaret)
This commit is contained in:
Родитель
463da05f0f
Коммит
4bf9f40228
|
@ -315,7 +315,7 @@ public class BrowserSearch extends HomeFragment
|
|||
|
||||
@Override
|
||||
protected void load() {
|
||||
getLoaderManager().initLoader(LOADER_ID_SEARCH, null, mCursorLoaderCallbacks);
|
||||
SearchLoader.init(getLoaderManager(), LOADER_ID_SEARCH, mCursorLoaderCallbacks, mSearchTerm, false);
|
||||
}
|
||||
|
||||
private void handleAutocomplete(String searchTerm, Cursor c) {
|
||||
|
|
|
@ -46,6 +46,12 @@ class SearchLoader {
|
|||
return args;
|
||||
}
|
||||
|
||||
public static void init(LoaderManager manager, int loaderId,
|
||||
LoaderCallbacks<Cursor> callbacks, String searchTerm, boolean performEmptySearch) {
|
||||
Bundle args = createArgs(searchTerm, performEmptySearch);
|
||||
manager.initLoader(loaderId, args, callbacks);
|
||||
}
|
||||
|
||||
public static void restart(LoaderManager manager, int loaderId,
|
||||
LoaderCallbacks<Cursor> callbacks, String searchTerm) {
|
||||
restart(manager, loaderId, callbacks, searchTerm, true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче