mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +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:
@@ -362,7 +362,7 @@ public class SecondaryDropTarget extends ButtonDropTarget implements OnAlarmList
|
||||
|
||||
public void onLauncherResume() {
|
||||
// We use MATCH_UNINSTALLED_PACKAGES as the app can be on SD card as well.
|
||||
if (new PackageManagerHelper(mContext).getApplicationInfo(mPackageName,
|
||||
if (PackageManagerHelper.INSTANCE.get(mContext).getApplicationInfo(mPackageName,
|
||||
mDragObject.dragInfo.user, PackageManager.MATCH_UNINSTALLED_PACKAGES) == null) {
|
||||
mDragObject.dragSource = mOriginal;
|
||||
mOriginal.onDropCompleted(SecondaryDropTarget.this, mDragObject, true);
|
||||
|
||||
Reference in New Issue
Block a user