Fix filtering of DesktopTaskViews
When finding last active tasks we didn't account for the fact that there could be more than 2 tasks in a GroupTask. This cl fixes that so it finds the correct last active tasks in desktop cases. Also make sure that if a DesktopTaskView is found, we don't launch it through TaskView#LaunchTasks to create a transition that we can handle in WM Shell. Fix: 327447672 Fix: 354171747 Flag: EXEMPT Bugfix Test: atest SplitSelectStateControllerTest Change-Id: I71cc630a79f23e5eaad10b3c2284496422ce6994
This commit is contained in:
1 parent
acc4a81a97
commit
9c0392e08d
2 files changed
+11
-12
No files matched your search
@@ -140,6 +140,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;
|
||||
@@ -1357,7 +1358,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();
|
||||
@@ -1408,7 +1410,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
startActivity(intent);
|
||||
} else {
|
||||
getSystemService(LauncherApps.class).startMainActivity(
|
||||
|
||||
Reference in new issue
Block a user