Loading libs/WindowManager/Shell/shared/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ java_library { "**/desktopmode/*.kt", ], static_libs: [ "WindowManager-Shell-shared-AOSP", "com.android.window.flags.window-aconfig-java", "wm_shell-shared-utils", ], Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +4 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.wm.shell.shared.desktopmode; import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED; import static com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper.enableBubbleToFullscreen; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; Loading Loading @@ -270,7 +272,8 @@ public class DesktopModeStatus { * necessarily enabling desktop mode */ public static boolean overridesShowAppHandle(@NonNull Context context) { return Flags.showAppHandleLargeScreens() && deviceHasLargeScreen(context); return (Flags.showAppHandleLargeScreens() || enableBubbleToFullscreen()) && deviceHasLargeScreen(context); } /** Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeVisualIndicator.java +15 −6 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ import com.android.wm.shell.RootTaskDisplayAreaOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; /** * Animated visual indicator for Desktop Mode windowing transitions. Loading Loading @@ -149,12 +151,19 @@ public class DesktopModeVisualIndicator { // left, and split right for the right edge. This is universal across all drag event types. if (inputCoordinates.x < 0) return TO_SPLIT_LEFT_INDICATOR; if (inputCoordinates.x > layout.width()) return TO_SPLIT_RIGHT_INDICATOR; IndicatorType result; if (BubbleAnythingFlagHelper.enableBubbleToFullscreen() && !DesktopModeStatus.canEnterDesktopMode(mContext)) { // If desktop is not available, default to "no indicator" result = NO_INDICATOR; } else { // If we are in freeform, we don't want a visible indicator in the "freeform" drag zone. // In drags not originating on a freeform caption, we should default to a TO_DESKTOP // indicator. IndicatorType result = mDragStartState == DragStartState.FROM_FREEFORM result = mDragStartState == DragStartState.FROM_FREEFORM ? NO_INDICATOR : TO_DESKTOP_INDICATOR; } final int transitionAreaWidth = mContext.getResources().getDimensionPixelSize( com.android.wm.shell.R.dimen.desktop_mode_transition_region_thickness); // Because drags in freeform use task position for indicator calculation, we need to Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −1 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import com.android.wm.shell.recents.RecentsTransitionStateListener; import com.android.wm.shell.shared.FocusTransitionListener; import com.android.wm.shell.shared.annotations.ShellBackgroundThread; import com.android.wm.shell.shared.annotations.ShellMainThread; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.shared.desktopmode.DesktopModeCompatPolicy; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; Loading Loading @@ -1439,13 +1440,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, mDragToDesktopAnimationStartBounds.set( relevantDecor.mTaskInfo.configuration.windowConfiguration.getBounds()); boolean dragFromStatusBarAllowed = false; final int windowingMode = relevantDecor.mTaskInfo.getWindowingMode(); if (DesktopModeStatus.canEnterDesktopMode(mContext)) { // 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 (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { // TODO(b/388851898): add support for split screen (multi-window wm mode) dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN; } final boolean shouldStartTransitionDrag = relevantDecor.checkTouchEventInFocusedCaptionHandle(ev) || DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +1 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,7 @@ class HandleMenu( view = handleMenuView.rootView, forciblyShownTypes = if (forceShowSystemBars) { systemBars() } else { 0 }, ignoreCutouts = Flags.showAppHandleLargeScreens() || BubbleAnythingFlagHelper.enableBubbleToFullscreen() ) } else { parentDecor.addWindow( Loading Loading
libs/WindowManager/Shell/shared/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ java_library { "**/desktopmode/*.kt", ], static_libs: [ "WindowManager-Shell-shared-AOSP", "com.android.window.flags.window-aconfig-java", "wm_shell-shared-utils", ], Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +4 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.wm.shell.shared.desktopmode; import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED; import static com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper.enableBubbleToFullscreen; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; Loading Loading @@ -270,7 +272,8 @@ public class DesktopModeStatus { * necessarily enabling desktop mode */ public static boolean overridesShowAppHandle(@NonNull Context context) { return Flags.showAppHandleLargeScreens() && deviceHasLargeScreen(context); return (Flags.showAppHandleLargeScreens() || enableBubbleToFullscreen()) && deviceHasLargeScreen(context); } /** Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeVisualIndicator.java +15 −6 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ import com.android.wm.shell.RootTaskDisplayAreaOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; /** * Animated visual indicator for Desktop Mode windowing transitions. Loading Loading @@ -149,12 +151,19 @@ public class DesktopModeVisualIndicator { // left, and split right for the right edge. This is universal across all drag event types. if (inputCoordinates.x < 0) return TO_SPLIT_LEFT_INDICATOR; if (inputCoordinates.x > layout.width()) return TO_SPLIT_RIGHT_INDICATOR; IndicatorType result; if (BubbleAnythingFlagHelper.enableBubbleToFullscreen() && !DesktopModeStatus.canEnterDesktopMode(mContext)) { // If desktop is not available, default to "no indicator" result = NO_INDICATOR; } else { // If we are in freeform, we don't want a visible indicator in the "freeform" drag zone. // In drags not originating on a freeform caption, we should default to a TO_DESKTOP // indicator. IndicatorType result = mDragStartState == DragStartState.FROM_FREEFORM result = mDragStartState == DragStartState.FROM_FREEFORM ? NO_INDICATOR : TO_DESKTOP_INDICATOR; } final int transitionAreaWidth = mContext.getResources().getDimensionPixelSize( com.android.wm.shell.R.dimen.desktop_mode_transition_region_thickness); // Because drags in freeform use task position for indicator calculation, we need to Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −1 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import com.android.wm.shell.recents.RecentsTransitionStateListener; import com.android.wm.shell.shared.FocusTransitionListener; import com.android.wm.shell.shared.annotations.ShellBackgroundThread; import com.android.wm.shell.shared.annotations.ShellMainThread; import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper; import com.android.wm.shell.shared.desktopmode.DesktopModeCompatPolicy; import com.android.wm.shell.shared.desktopmode.DesktopModeStatus; import com.android.wm.shell.shared.desktopmode.DesktopModeTransitionSource; Loading Loading @@ -1439,13 +1440,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, mDragToDesktopAnimationStartBounds.set( relevantDecor.mTaskInfo.configuration.windowConfiguration.getBounds()); boolean dragFromStatusBarAllowed = false; final int windowingMode = relevantDecor.mTaskInfo.getWindowingMode(); if (DesktopModeStatus.canEnterDesktopMode(mContext)) { // 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 (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) { // TODO(b/388851898): add support for split screen (multi-window wm mode) dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN; } final boolean shouldStartTransitionDrag = relevantDecor.checkTouchEventInFocusedCaptionHandle(ev) || DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +1 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,7 @@ class HandleMenu( view = handleMenuView.rootView, forciblyShownTypes = if (forceShowSystemBars) { systemBars() } else { 0 }, ignoreCutouts = Flags.showAppHandleLargeScreens() || BubbleAnythingFlagHelper.enableBubbleToFullscreen() ) } else { parentDecor.addWindow( Loading