Loading libs/WindowManager/Shell/aconfig/multitasking.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,16 @@ flag { } } flag { name: "enable_bubble_app_compat_fixes" namespace: "multitasking" description: "Enable fixes for app compat (e.g. insets and layout issues) for bubbles" bug: "384610402" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_taskbar_on_phones" namespace: "multitasking" Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/BubbleAnythingFlagHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ public class BubbleAnythingFlagHelper { && com.android.window.flags.Flags.excludeTaskFromRecents(); } /** Whether creating any bubble and app compat fixes for bubbles are enabled. */ public static boolean enableCreateAnyBubbleWithAppCompatFixes() { return Flags.enableCreateAnyBubble() && Flags.enableBubbleAppCompatFixes(); } /** * Whether creating any bubble and transforming to fullscreen, or the overall bubble anything * feature is enabled. Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +11 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.wm.shell.taskview; import static android.view.InsetsSource.FLAG_FORCE_CONSUMING; import static android.view.InsetsSource.FLAG_FORCE_CONSUMING_OPAQUE_CAPTION_BAR; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import android.annotation.NonNull; Loading Loading @@ -411,9 +414,16 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { if (mTaskToken == null) return; WindowContainerTransaction wct = new WindowContainerTransaction(); if (mCaptionInsets != null) { int flags = 0; if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) { // When the bubble bar app handle is visible, the caption insets will be set and // should always be consumed, otherwise the handle may block app content. flags = FLAG_FORCE_CONSUMING | FLAG_FORCE_CONSUMING_OPAQUE_CAPTION_BAR; } wct.addInsetsSource(mTaskToken, mCaptionInsetsOwner, 0, WindowInsets.Type.captionBar(), mCaptionInsets, null /* boundingRects */, 0 /* flags */); flags); } else { wct.removeInsetsSource(mTaskToken, mCaptionInsetsOwner, 0, WindowInsets.Type.captionBar()); Loading Loading
libs/WindowManager/Shell/aconfig/multitasking.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,16 @@ flag { } } flag { name: "enable_bubble_app_compat_fixes" namespace: "multitasking" description: "Enable fixes for app compat (e.g. insets and layout issues) for bubbles" bug: "384610402" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_taskbar_on_phones" namespace: "multitasking" Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/bubbles/BubbleAnythingFlagHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ public class BubbleAnythingFlagHelper { && com.android.window.flags.Flags.excludeTaskFromRecents(); } /** Whether creating any bubble and app compat fixes for bubbles are enabled. */ public static boolean enableCreateAnyBubbleWithAppCompatFixes() { return Flags.enableCreateAnyBubble() && Flags.enableBubbleAppCompatFixes(); } /** * Whether creating any bubble and transforming to fullscreen, or the overall bubble anything * feature is enabled. Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +11 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package com.android.wm.shell.taskview; import static android.view.InsetsSource.FLAG_FORCE_CONSUMING; import static android.view.InsetsSource.FLAG_FORCE_CONSUMING_OPAQUE_CAPTION_BAR; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES_NOISY; import android.annotation.NonNull; Loading Loading @@ -411,9 +414,16 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { if (mTaskToken == null) return; WindowContainerTransaction wct = new WindowContainerTransaction(); if (mCaptionInsets != null) { int flags = 0; if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) { // When the bubble bar app handle is visible, the caption insets will be set and // should always be consumed, otherwise the handle may block app content. flags = FLAG_FORCE_CONSUMING | FLAG_FORCE_CONSUMING_OPAQUE_CAPTION_BAR; } wct.addInsetsSource(mTaskToken, mCaptionInsetsOwner, 0, WindowInsets.Type.captionBar(), mCaptionInsets, null /* boundingRects */, 0 /* flags */); flags); } else { wct.removeInsetsSource(mTaskToken, mCaptionInsetsOwner, 0, WindowInsets.Type.captionBar()); Loading