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

Commit ca4cc641 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix filtering of DesktopTaskViews" into main

parents ea5e8f10 9c0392e0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ import com.android.quickstep.RecentsModel;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.util.DesktopTask;
import com.android.quickstep.util.GroupTask;
import com.android.quickstep.views.DesktopTaskView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.Task;
@@ -1412,7 +1413,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                    if (foundTask != null) {
                        TaskView foundTaskView = recents.getTaskViewByTaskId(foundTask.key.id);
                        if (foundTaskView != null
                                && foundTaskView.isVisibleToUser()) {
                                && foundTaskView.isVisibleToUser()
                                && !(foundTaskView instanceof DesktopTaskView)) {
                            TestLogging.recordEvent(
                                    TestProtocol.SEQUENCE_MAIN, "start: taskbarAppIcon");
                            foundTaskView.launchTasks();
@@ -1463,7 +1465,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                        return;
                    }
                }

                startActivity(intent);
            } else {
                getSystemService(LauncherApps.class).startMainActivity(
+8 −10
Original line number Diff line number Diff line
@@ -276,17 +276,15 @@ public class SplitSelectStateController {
                    // Loop through tasks in reverse, since they are ordered with recent tasks last
                    for (int j = taskGroups.size() - 1; j >= 0; j--) {
                        GroupTask groupTask = taskGroups.get(j);
                        Task task1 = groupTask.task1;
                        // Don't add duplicate Tasks
                        if (isInstanceOfComponent(task1, key)
                                && !Arrays.asList(lastActiveTasks).contains(task1)) {
                            lastActiveTask = task1;
                        // Account for desktop cases where there can be N tasks in the group
                        for (Task task : groupTask.getTasks()) {
                            if (isInstanceOfComponent(task, key)
                                    && !Arrays.asList(lastActiveTasks).contains(task)) {
                                lastActiveTask = task;
                                break;
                            }
                        Task task2 = groupTask.task2;
                        if (isInstanceOfComponent(task2, key)
                                && !Arrays.asList(lastActiveTasks).contains(task2)) {
                            lastActiveTask = task2;
                        }
                        if (lastActiveTask != null) {
                            break;
                        }
                    }