mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Fixing Launcher preview leaking surface and memory
> Closing existing preview if a new request comes for same host token > Closing in-memory icon db when closing preview > Removing unnecessary wait blocks on UI thread and rendering view asynchronously > Fixing preview loading failing on LauncherAppState access Bug: 186712316 Bug: 187140897 Test: Manual Change-Id: I045930b007e5dc015320224a197eee20a8354d17
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -52,8 +54,14 @@ public class ModelPreload implements ModelUpdateTask {
|
||||
public final void run() {
|
||||
mModel.startLoaderForResultsIfNotLoaded(
|
||||
new LoaderResults(mApp, mBgDataModel, mAllAppsList, new Callbacks[0]));
|
||||
Log.d(TAG, "Preload completed : " + mModel.isModelLoaded());
|
||||
onComplete(mModel.isModelLoaded());
|
||||
MODEL_EXECUTOR.post(() -> {
|
||||
Log.d(TAG, "Preload completed : " + mModel.isModelLoaded());
|
||||
onComplete(mModel.isModelLoaded());
|
||||
});
|
||||
}
|
||||
|
||||
public BgDataModel getBgDataModel() {
|
||||
return mBgDataModel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user