mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Removing static listeners from PackageInstallerCompat
Bug: 141376165 Change-Id: I2b49d53a05a04c622ed5a7b723109a6cc230d230
This commit is contained in:
@@ -19,16 +19,14 @@ import android.content.ComponentName;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import com.android.launcher3.AppInfo;
|
||||
import com.android.launcher3.ItemInfo;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.LauncherModel.CallbackTask;
|
||||
import com.android.launcher3.model.BgDataModel.Callbacks;
|
||||
import com.android.launcher3.PromiseAppInfo;
|
||||
import com.android.launcher3.WorkspaceItemInfo;
|
||||
import com.android.launcher3.compat.PackageInstallerCompat;
|
||||
import com.android.launcher3.compat.PackageInstallerCompat.PackageInstallInfo;
|
||||
import com.android.launcher3.model.BgDataModel.Callbacks;
|
||||
import com.android.launcher3.pm.PackageInstallInfo;
|
||||
import com.android.launcher3.util.InstantAppResolver;
|
||||
|
||||
import java.util.HashSet;
|
||||
@@ -46,7 +44,7 @@ public class PackageInstallStateChangedTask extends BaseModelUpdateTask {
|
||||
|
||||
@Override
|
||||
public void execute(LauncherAppState app, BgDataModel dataModel, AllAppsList apps) {
|
||||
if (mInstallInfo.state == PackageInstallerCompat.STATUS_INSTALLED) {
|
||||
if (mInstallInfo.state == PackageInstallInfo.STATUS_INSTALLED) {
|
||||
try {
|
||||
// For instant apps we do not get package-add. Use setting events to update
|
||||
// any pinned icons.
|
||||
@@ -79,7 +77,7 @@ public class PackageInstallStateChangedTask extends BaseModelUpdateTask {
|
||||
if (si.hasPromiseIconUi() && (cn != null)
|
||||
&& mInstallInfo.packageName.equals(cn.getPackageName())) {
|
||||
si.setInstallProgress(mInstallInfo.progress);
|
||||
if (mInstallInfo.state == PackageInstallerCompat.STATUS_FAILED) {
|
||||
if (mInstallInfo.state == PackageInstallInfo.STATUS_FAILED) {
|
||||
// Mark this info as broken.
|
||||
si.status &= ~WorkspaceItemInfo.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user