mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Migrate PackageManagerHelper to MainThreadInitializedObject
- This is in preparation for other things that can be loaded with PMH initialization and prevents duplicate temporary helpers from loading this many times. - Most calls in PMH can use the app context, but one call requires starting activities/showing toasts so that one needs to take the context and can be made static instead. Bug: 323112914 Test: atest NexusLauncherTests Change-Id: Id11c780955880cf49c022cbf2744c41e1b696355
This commit is contained in:
@@ -447,8 +447,8 @@ public class LauncherModel implements InstallSessionTracker.Callback {
|
||||
IconCache iconCache = app.getIconCache();
|
||||
final IntSet removedIds = new IntSet();
|
||||
HashSet<WorkspaceItemInfo> archivedWorkspaceItemsToCacheRefresh = new HashSet<>();
|
||||
boolean isAppArchived = new PackageManagerHelper(
|
||||
mApp.getContext()).isAppArchivedForUser(packageName, user);
|
||||
boolean isAppArchived = PackageManagerHelper.INSTANCE.get(mApp.getContext())
|
||||
.isAppArchivedForUser(packageName, user);
|
||||
synchronized (dataModel) {
|
||||
if (isAppArchived) {
|
||||
// Remove package icon cache entry for archived app in case of a session
|
||||
|
||||
Reference in New Issue
Block a user