Loading src/com/android/launcher3/LauncherModel.java +5 −3 Original line number Diff line number Diff line Loading @@ -114,8 +114,6 @@ public class LauncherModel implements InstallSessionTracker.Callback { // only allow this once per reboot to reload work apps private boolean mShouldReloadWorkProfile = true; boolean mIgnoreLoaded; // Indicates whether the current model data is valid or not. // We start off with everything not loaded. After that, we assume that // our monitoring of the package manager provides all updates and we never Loading Loading @@ -619,7 +617,7 @@ public class LauncherModel implements InstallSessionTracker.Callback { return; } MODEL_EXECUTOR.execute(() -> { if (!isModelLoaded() && !mIgnoreLoaded) { if (!isModelLoaded() && !task.isIgnoreLoaded()) { // Loader has not yet run. return; } Loading @@ -642,6 +640,10 @@ public class LauncherModel implements InstallSessionTracker.Callback { void execute(@NonNull ModelTaskController taskController, @NonNull BgDataModel dataModel, @NonNull AllAppsList apps); default boolean isIgnoreLoaded() { return false; // Default value } } public void updateAndBindWorkspaceItem(@NonNull final WorkspaceItemInfo si, Loading src/com/android/launcher3/model/AddWorkspaceItemsTask.java +6 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { private final WorkspaceItemSpaceFinder mItemSpaceFinder; private boolean mAnimated = true; private boolean mIgnoreLoaded; private boolean mIgnoreLoaded = false; public AddWorkspaceItemsTask(List<Pair<ItemInfo, Object>> itemList, boolean ignoreLoaded) { this(itemList); Loading Loading @@ -90,6 +90,10 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { mItemSpaceFinder = itemSpaceFinder; } @Override public boolean isIgnoreLoaded() { return mIgnoreLoaded; } @Override public void execute(@NonNull ModelTaskController taskController, @NonNull BgDataModel dataModel, Loading @@ -116,8 +120,7 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { // b/139663018 Short-circuit this logic if the icon is a system app if (PackageManagerHelper.isSystemApp(context, // Objects.requireNonNull(item.getIntent())) && !mIgnoreLoaded) { Objects.requireNonNull(item.getIntent()))) { Objects.requireNonNull(item.getIntent())) && !mIgnoreLoaded) { continue; } Loading Loading
src/com/android/launcher3/LauncherModel.java +5 −3 Original line number Diff line number Diff line Loading @@ -114,8 +114,6 @@ public class LauncherModel implements InstallSessionTracker.Callback { // only allow this once per reboot to reload work apps private boolean mShouldReloadWorkProfile = true; boolean mIgnoreLoaded; // Indicates whether the current model data is valid or not. // We start off with everything not loaded. After that, we assume that // our monitoring of the package manager provides all updates and we never Loading Loading @@ -619,7 +617,7 @@ public class LauncherModel implements InstallSessionTracker.Callback { return; } MODEL_EXECUTOR.execute(() -> { if (!isModelLoaded() && !mIgnoreLoaded) { if (!isModelLoaded() && !task.isIgnoreLoaded()) { // Loader has not yet run. return; } Loading @@ -642,6 +640,10 @@ public class LauncherModel implements InstallSessionTracker.Callback { void execute(@NonNull ModelTaskController taskController, @NonNull BgDataModel dataModel, @NonNull AllAppsList apps); default boolean isIgnoreLoaded() { return false; // Default value } } public void updateAndBindWorkspaceItem(@NonNull final WorkspaceItemInfo si, Loading
src/com/android/launcher3/model/AddWorkspaceItemsTask.java +6 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { private final WorkspaceItemSpaceFinder mItemSpaceFinder; private boolean mAnimated = true; private boolean mIgnoreLoaded; private boolean mIgnoreLoaded = false; public AddWorkspaceItemsTask(List<Pair<ItemInfo, Object>> itemList, boolean ignoreLoaded) { this(itemList); Loading Loading @@ -90,6 +90,10 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { mItemSpaceFinder = itemSpaceFinder; } @Override public boolean isIgnoreLoaded() { return mIgnoreLoaded; } @Override public void execute(@NonNull ModelTaskController taskController, @NonNull BgDataModel dataModel, Loading @@ -116,8 +120,7 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { // b/139663018 Short-circuit this logic if the icon is a system app if (PackageManagerHelper.isSystemApp(context, // Objects.requireNonNull(item.getIntent())) && !mIgnoreLoaded) { Objects.requireNonNull(item.getIntent()))) { Objects.requireNonNull(item.getIntent())) && !mIgnoreLoaded) { continue; } Loading