mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Load PackageItemInfo in background thread to prevent ANR
- Decoupled widget model from widget view, and placed the creation to LauncherModel. - As a result packagemanager operation, iconcache retrieval is all done inside LauncherModel on background thread b/21311085 b/21325319 Change-Id: I294698527db58b89f3da558090a367530c058776
This commit is contained in:
@@ -206,8 +206,7 @@ public class WidgetPreviewLoader {
|
||||
* This ensures that we remove entries for packages which changed while the launcher was dead.
|
||||
*/
|
||||
public void removeObsoletePreviews(ArrayList<Object> list) {
|
||||
// This method should always be called from the worker thread.
|
||||
Assert.assertTrue(LauncherModel.sWorkerThread.getThreadId() == Process.myTid());
|
||||
Utilities.assertWorkerThread();
|
||||
|
||||
LongSparseArray<UserHandleCompat> userIdCache = new LongSparseArray<>();
|
||||
LongSparseArray<HashSet<String>> validPackages = new LongSparseArray<>();
|
||||
|
||||
Reference in New Issue
Block a user