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

Commit bbd48bf2 authored by Ats Jenk's avatar Ats Jenk
Browse files

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
parent 48a6892d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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",
    ],
+4 −1
Original line number Diff line number Diff line
@@ -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);
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ class HandleMenu(
                    view = handleMenuView.rootView,
                    forciblyShownTypes = if (forceShowSystemBars) { systemBars() } else { 0 },
                    ignoreCutouts = Flags.showAppHandleLargeScreens()
                            || BubbleAnythingFlagHelper.enableBubbleToFullscreen()
                )
            } else {
                parentDecor.addWindow(
+2 −0
Original line number Diff line number Diff line
@@ -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 " +