diff options
author | 2025-01-22 16:00:33 -0800 | |
---|---|---|
committer | 2025-01-29 14:57:56 -0800 | |
commit | bbd48bf2c36b69bebf7d9c15c1f61f4a40dd68f0 (patch) | |
tree | eb7255577fe0e1e1d1c5fbf8967e6cf64cf2f4cf | |
parent | 48a6892d7b618875caa0d8e874b69691b5667ddb (diff) |
Enable app handle based on bubbles flag
Show app handle when feature flag to drag an app to bubble is enabled.
Bug: 388851898
Test: enable the flag and check that app handle is shown on a foldable
Flag: com.android.wm.shell.enable_bubble_to_fullscreen
Change-Id: Ia72fa393a39a480367feaed3a644ab0bcd052537
4 files changed, 8 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/shared/Android.bp b/libs/WindowManager/Shell/shared/Android.bp index 261c63948a94..af46ca298efe 100644 --- a/libs/WindowManager/Shell/shared/Android.bp +++ b/libs/WindowManager/Shell/shared/Android.bp @@ -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", ], diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java index e196880aad0f..ea0894bf1eea 100644 --- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java @@ -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; @@ -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); } /** diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt index 32a2f8294877..1d9564948772 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt @@ -252,6 +252,7 @@ class HandleMenu( view = handleMenuView.rootView, forciblyShownTypes = if (forceShowSystemBars) { systemBars() } else { 0 }, ignoreCutouts = Flags.showAppHandleLargeScreens() + || BubbleAnythingFlagHelper.enableBubbleToFullscreen() ) } else { parentDecor.addWindow( diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt index 1264c013faf5..2948fdaf16af 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt @@ -41,6 +41,7 @@ import com.android.internal.policy.SystemBarUtils import com.android.window.flags.Flags import com.android.wm.shell.R import com.android.wm.shell.shared.animation.Interpolators +import com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper import com.android.wm.shell.windowdecor.WindowManagerWrapper import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer @@ -146,6 +147,7 @@ internal class AppHandleViewHolder( taskInfo.taskId, handlePosition.x, handlePosition.y, handleWidth, handleHeight, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, ignoreCutouts = Flags.showAppHandleLargeScreens() + || BubbleAnythingFlagHelper.enableBubbleToFullscreen() ) val view = statusBarInputLayer?.view ?: error("Unable to find statusBarInputLayer View") val lp = statusBarInputLayer?.lp ?: error("Unable to find statusBarInputLayer " + |