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

Commit d1f6dbaa authored by Annie Lin's avatar Annie Lin
Browse files

Cleanup `enableBubbleAppCompatFixes` code references.

Bug: 425491394
Test: wm presubmit
Flag: EXEMPT removing com.android.wm.shell.enable_bubble_app_compat_fixes
Change-Id: I76aabdb6d0e5d5fdd3848bd3bce9492ddce5767a
parent c8b343c0
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_ANYTHING
import com.android.wm.shell.Flags.FLAG_ENABLE_BUBBLE_APP_COMPAT_FIXES
import com.android.wm.shell.Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE
import com.android.wm.shell.MockToken
import com.android.wm.shell.ShellTaskOrganizer
@@ -134,7 +133,6 @@ class BubbleTaskStackListenerTest {
    @EnableFlags(
        FLAG_ENABLE_CREATE_ANY_BUBBLE,
        FLAG_ENABLE_BUBBLE_ANYTHING,
        FLAG_ENABLE_BUBBLE_APP_COMPAT_FIXES,
    )
    fun onActivityRestartAttempt_inStackAppBubbleToFullscreen_notifiesTaskRemoval() {
        val captionInsetsOwner = Binder()
@@ -197,7 +195,6 @@ class BubbleTaskStackListenerTest {
    @EnableFlags(
        FLAG_ENABLE_CREATE_ANY_BUBBLE,
        FLAG_ENABLE_BUBBLE_ANYTHING,
        FLAG_ENABLE_BUBBLE_APP_COMPAT_FIXES,
    )
    fun onTaskMovedToFront_inStackAppBubbleToFullscreen_notifiesTaskRemoval() {
        task.configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
+0 −5
Original line number Diff line number Diff line
@@ -31,11 +31,6 @@ public class BubbleAnythingFlagHelper {
        return enableBubbleAnything() || Flags.enableCreateAnyBubble();
    }

    /** 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.
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ object BubbleUtils {
                wct.setBounds(token, Rect())
            }
        }
        if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) {
        if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) {
            if (!toBubble && captionInsetsOwner != null) {
                wct.removeInsetsSource(
                    token, captionInsetsOwner, 0 /* index */, WindowInsets.Type.captionBar()
+1 −2
Original line number Diff line number Diff line
@@ -35,8 +35,7 @@ final class CompatUIUtils {
        // TODO(b/384610402): Clean this up once Bubble Anything is launched and re-check logic
        // for other multi-window modes.
        boolean shouldCheckForPhoneScreenWidth = true;
        if (com.android.wm.shell.Flags.enableCreateAnyBubble()
                && com.android.wm.shell.Flags.enableBubbleAppCompatFixes()) {
        if (com.android.wm.shell.Flags.enableCreateAnyBubble()) {
            if (taskInfo.isAppBubble) {
                shouldCheckForPhoneScreenWidth = false;
            }
+1 −1
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
        WindowContainerTransaction wct = new WindowContainerTransaction();
        if (mCaptionInsets != null) {
            int flags = 0;
            if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) {
            if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) {
                // 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;
Loading