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

Commit d1bc3b39 authored by Alex Chau's avatar Alex Chau
Browse files

Ensure SAVE_APP_PAIR is only used for GroupedTaskView

- Check if TaskView is GroupedTaskView before casting to avoid a crash, caused by DesktopTaskView.containsMultipleTasks() is true but is not a GroupedTaskView

Fix: 331226084
Test: With Talkback on and Desktop task, go to Overview
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: Ic2f1b940bb5a6b0cf452465b9cc15ebf4c256858
parent f952c4a4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -332,11 +332,13 @@ public interface TaskShortcutFactory {
            // - the task in question is a single task
            // - at least one app in app pair is unpinnable
            // - the Overview Actions Button should be visible
            // - the task is not a GroupedTaskView
            if (!FeatureFlags.enableAppPairs()
                    || !recentsView.supportsAppPairs()
                    || !taskView.containsMultipleTasks()
                    || hasUnpinnableApp
                    || shouldShowActionsButtonInstead) {
                    || shouldShowActionsButtonInstead
                    || !(taskView instanceof GroupedTaskView)) {
                return null;
            }