mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Moving all-apps predictions to Launcher model
Predictions are loaded and managed by Launcher model and follow the model lifecycle. They are then bound to the callback which handles the UI Bug: 160748731 Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
This commit is contained in:
@@ -109,6 +109,7 @@ public class LoaderTask implements Runnable {
|
||||
protected final LauncherAppState mApp;
|
||||
private final AllAppsList mBgAllAppsList;
|
||||
protected final BgDataModel mBgDataModel;
|
||||
private final ModelDelegate mModelDelegate;
|
||||
|
||||
private FirstScreenBroadcast mFirstScreenBroadcast;
|
||||
|
||||
@@ -128,10 +129,11 @@ public class LoaderTask implements Runnable {
|
||||
private boolean mStopped;
|
||||
|
||||
public LoaderTask(LauncherAppState app, AllAppsList bgAllAppsList, BgDataModel dataModel,
|
||||
LoaderResults results) {
|
||||
ModelDelegate modelDelegate, LoaderResults results) {
|
||||
mApp = app;
|
||||
mBgAllAppsList = bgAllAppsList;
|
||||
mBgDataModel = dataModel;
|
||||
mModelDelegate = modelDelegate;
|
||||
mResults = results;
|
||||
|
||||
mLauncherApps = mApp.getContext().getSystemService(LauncherApps.class);
|
||||
@@ -767,6 +769,9 @@ public class LoaderTask implements Runnable {
|
||||
IOUtils.closeSilently(c);
|
||||
}
|
||||
|
||||
// Load delegate items
|
||||
mModelDelegate.loadItems();
|
||||
|
||||
// Break early if we've stopped loading
|
||||
if (mStopped) {
|
||||
mBgDataModel.clear();
|
||||
|
||||
Reference in New Issue
Block a user