fix: Don't call archive status check on low APIs (#6687)

This commit is contained in:
Pun Butrach authored and GitHub committed 2026-04-24 19:12:45 +07:00
1 parent 009b96f233
commit 3acaf1d806
7 files changed
+11 -8

No files matched your search

@@ -41,6 +41,7 @@ import com.android.launcher3.Flags;
import com.android.launcher3.LauncherModel.ModelUpdateTask;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.icons.IconCache;
import com.android.launcher3.logging.FileLog;
@@ -350,7 +351,7 @@ public class PackageUpdatedTask implements ModelUpdateTask {
// In case an app is archived, we need to make sure that archived state
// in WorkspaceItemInfo is refreshed.
try {
if (Flags.enableSupportForArchiving() && !activities.isEmpty()) {
if (Utilities.ATLEAST_V && (Flags.enableSupportForArchiving() && !activities.isEmpty())) {
boolean newArchivalState = activities.get(0)
.getActivityInfo().isArchived;
if (newArchivalState != itemInfo.isArchived()) {