mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917350 - Factor out method to create SearchLoader arguments (r=margaret)
This commit is contained in:
parent
8bc1d4c7d9
commit
09c846ac9e
@ -38,6 +38,14 @@ class SearchLoader {
|
||||
}
|
||||
}
|
||||
|
||||
private static Bundle createArgs(String searchTerm, boolean performEmptySearch) {
|
||||
Bundle args = new Bundle();
|
||||
args.putString(SearchLoader.KEY_SEARCH_TERM, searchTerm);
|
||||
args.putBoolean(SearchLoader.KEY_PERFORM_EMPTY_SEARCH, performEmptySearch);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
public static void restart(LoaderManager manager, int loaderId,
|
||||
LoaderCallbacks<Cursor> callbacks, String searchTerm) {
|
||||
restart(manager, loaderId, callbacks, searchTerm, true);
|
||||
@ -45,10 +53,8 @@ class SearchLoader {
|
||||
|
||||
public static void restart(LoaderManager manager, int loaderId,
|
||||
LoaderCallbacks<Cursor> callbacks, String searchTerm, boolean performEmptySearch) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(SearchLoader.KEY_SEARCH_TERM, searchTerm);
|
||||
bundle.putBoolean(SearchLoader.KEY_PERFORM_EMPTY_SEARCH, performEmptySearch);
|
||||
manager.restartLoader(loaderId, bundle, callbacks);
|
||||
Bundle args = createArgs(searchTerm, performEmptySearch);
|
||||
manager.restartLoader(loaderId, args, callbacks);
|
||||
}
|
||||
|
||||
public static class SearchCursorLoader extends SimpleCursorLoader {
|
||||
|
Loading…
Reference in New Issue
Block a user