Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32a3421f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed a bug where restored promise icons stay promise icons." into...

Merge "Fixed a bug where restored promise icons stay promise icons." into ub-launcher3-qt-future-dev
parents bba8c98d 3944746f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ public class WorkspaceItemInfo extends ItemInfoWithIcon {
    public ComponentName getTargetComponent() {
        ComponentName cn = super.getTargetComponent();
        if (cn == null && (itemType == Favorites.ITEM_TYPE_SHORTCUT
                || hasStatusFlag(FLAG_SUPPORTS_WEB_UI | FLAG_AUTOINSTALL_ICON))) {
                || hasStatusFlag(FLAG_SUPPORTS_WEB_UI|FLAG_AUTOINSTALL_ICON|FLAG_RESTORED_ICON))) {
            // Legacy shortcuts and promise icons with web UI may not have a componentName but just
            // a packageName. In that case create a dummy componentName instead of adding additional
            // check everywhere.
+4 −1
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;

import static com.android.launcher3.WorkspaceItemInfo.FLAG_AUTOINSTALL_ICON;
import static com.android.launcher3.WorkspaceItemInfo.FLAG_RESTORED_ICON;

/**
 * Handles updates due to changes in package manager (app installed/updated/removed)
 * or when a user availability changes.
@@ -221,7 +224,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
                                    isTargetValid = LauncherAppsCompat.getInstance(context)
                                            .isActivityEnabledForProfile(cn, mUser);
                                }
                                if (si.hasStatusFlag(FLAG_AUTOINSTALL_ICON)) {
                                if (si.hasStatusFlag(FLAG_RESTORED_ICON | FLAG_AUTOINSTALL_ICON)) {
                                    if (updateWorkspaceItemIntent(context, si, packageName)) {
                                        infoUpdated = true;
                                    } else if (si.hasPromiseIconUi()) {