Removing static instance of LauncherAppsCompat and unnecessary wrapper classes

Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
This commit is contained in:
Sunny Goyal
2019-10-02 16:13:34 -07:00
parent a0db584e08
commit e7b00128c7
33 changed files with 318 additions and 541 deletions

View File

@@ -17,6 +17,7 @@ package com.android.launcher3.model;
import android.content.Intent;
import android.content.pm.LauncherActivityInfo;
import android.content.pm.LauncherApps;
import android.content.pm.PackageInstaller.SessionInfo;
import android.os.UserHandle;
import android.util.LongSparseArray;
@@ -31,7 +32,6 @@ import com.android.launcher3.LauncherAppWidgetInfo;
import com.android.launcher3.LauncherModel.CallbackTask;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.model.BgDataModel.Callbacks;
import com.android.launcher3.pm.PackageInstallerCompat;
import com.android.launcher3.util.GridOccupancy;
@@ -90,7 +90,7 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
PackageInstallerCompat packageInstaller =
PackageInstallerCompat.getInstance(app.getContext());
LauncherAppsCompat launcherApps = LauncherAppsCompat.getInstance(app.getContext());
LauncherApps launcherApps = app.getContext().getSystemService(LauncherApps.class);
for (ItemInfo item : filteredItems) {
// Find appropriate space for the item.