diff options
Diffstat (limited to 'src/com/android/launcher3/model/LoaderTask.java')
-rw-r--r-- | src/com/android/launcher3/model/LoaderTask.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java index 4b01b5ed1..54249dc61 100644 --- a/src/com/android/launcher3/model/LoaderTask.java +++ b/src/com/android/launcher3/model/LoaderTask.java @@ -20,6 +20,7 @@ import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_LOCKED_USER; import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SAFEMODE; import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED; import static com.android.launcher3.model.LoaderResults.filterCurrentWorkspaceItems; +import static com.android.launcher3.util.PackageManagerHelper.isSystemApp; import android.appwidget.AppWidgetProviderInfo; import android.content.ComponentName; @@ -39,7 +40,6 @@ import android.util.Log; import android.util.LongSparseArray; import android.util.MutableInt; -import com.android.launcher3.AllAppsList; import com.android.launcher3.AppInfo; import com.android.launcher3.FolderInfo; import com.android.launcher3.InstallShortcutReceiver; @@ -57,7 +57,7 @@ import com.android.launcher3.compat.PackageInstallerCompat; import com.android.launcher3.compat.UserManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.folder.Folder; -import com.android.launcher3.folder.FolderIconPreviewVerifier; +import com.android.launcher3.folder.FolderGridOrganizer; import com.android.launcher3.icons.ComponentWithLabel; import com.android.launcher3.icons.ComponentWithLabel.ComponentCachingLogic; import com.android.launcher3.icons.IconCache; @@ -69,6 +69,7 @@ import com.android.launcher3.provider.ImportDataTask; import com.android.launcher3.shortcuts.DeepShortcutManager; import com.android.launcher3.shortcuts.ShortcutKey; import com.android.launcher3.util.ComponentKey; +import com.android.launcher3.util.IOUtils; import com.android.launcher3.util.LooperIdleLock; import com.android.launcher3.util.MultiHashMap; import com.android.launcher3.util.PackageManagerHelper; @@ -317,9 +318,9 @@ public class LoaderTask implements Runnable { // We can only query for shortcuts when the user is unlocked. if (userUnlocked) { - List<ShortcutInfo> pinnedShortcuts = + DeepShortcutManager.QueryResult pinnedShortcuts = mShortcutManager.queryForPinnedShortcuts(null, user); - if (mShortcutManager.wasLastCallSuccess()) { + if (pinnedShortcuts.wasSuccess()) { for (ShortcutInfo shortcut : pinnedShortcuts) { shortcutKeyToPinnedShortcuts.put(ShortcutKey.fromInfo(shortcut), shortcut); @@ -531,7 +532,7 @@ public class LoaderTask implements Runnable { info.spanX = 1; info.spanY = 1; info.runtimeStatusFlags |= disabledState; - if (isSafeMode && !Utilities.isSystemApp(context, intent)) { + if (isSafeMode && !isSystemApp(context, intent)) { info.runtimeStatusFlags |= FLAG_DISABLED_SAFEMODE; } @@ -703,7 +704,7 @@ public class LoaderTask implements Runnable { } } } finally { - Utilities.closeSilently(c); + IOUtils.closeSilently(c); } // Break early if we've stopped loading @@ -743,8 +744,8 @@ public class LoaderTask implements Runnable { } // Sort the folder items, update ranks, and make sure all preview items are high res. - FolderIconPreviewVerifier verifier = - new FolderIconPreviewVerifier(mApp.getInvariantDeviceProfile()); + FolderGridOrganizer verifier = + new FolderGridOrganizer(mApp.getInvariantDeviceProfile()); for (FolderInfo folder : mBgDataModel.folders) { Collections.sort(folder.contents, Folder.ITEM_POS_COMPARATOR); verifier.setFolderInfo(folder); @@ -829,7 +830,7 @@ public class LoaderTask implements Runnable { } } - mBgAllAppsList.added = new ArrayList<>(); + mBgAllAppsList.getAndResetChangeFlag(); return allActivityList; } |