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

Commit 1fc3f5eb authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

fix: show workspace apps

parent 983d96b2
Loading
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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
@@ -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;
            }
@@ -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,
+6 −3
Original line number Diff line number Diff line
@@ -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);
@@ -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,
@@ -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;
                    }