Allow dragging through the status bar on split-screen tasks
Changes the drag through the status bar event handling so that drag is allowed when the task is in multi-window mode instead of just fullscreen. Tasks in split (when desktop mode is enabled) have a window decoration with a caption just like fullscreen tasks, so they need to be draggable too. Bug: 285395534 Test: with desktop mode enabled, put two apps in split, drag the handle bar and verify it responds to touch and is able to be dragged into freeform. Change-Id: Ia92d25e10d890c9d6c875a202d16da56eb48d762
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.wm.shell.windowdecor;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
|
||||
|
||||
import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
|
||||
import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT;
|
||||
@@ -548,9 +549,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
|
||||
relevantDecor.mTaskInfo.configuration.windowConfiguration.getBounds());
|
||||
boolean dragFromStatusBarAllowed = false;
|
||||
if (DesktopModeStatus.isProto2Enabled()) {
|
||||
// In proto2 any full screen task can be dragged to freeform
|
||||
dragFromStatusBarAllowed = relevantDecor.mTaskInfo.getWindowingMode()
|
||||
== WINDOWING_MODE_FULLSCREEN;
|
||||
// In proto2 any full screen or multi-window task can be dragged to
|
||||
// freeform.
|
||||
final int windowingMode = relevantDecor.mTaskInfo.getWindowingMode();
|
||||
dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN
|
||||
|| windowingMode == WINDOWING_MODE_MULTI_WINDOW;
|
||||
}
|
||||
|
||||
if (dragFromStatusBarAllowed && relevantDecor.checkTouchEventInHandle(ev)) {
|
||||
|
||||
Reference in New Issue
Block a user