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

Commit 1e073d55 authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Clear task bounds when exiting bubble" into main

parents bf52b863 a26c0cf9
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.bubbles.util
package com.android.wm.shell.bubbles.util


import android.app.WindowConfiguration
import android.app.WindowConfiguration
import android.graphics.Rect
import android.os.Binder
import android.os.Binder
import android.view.WindowInsets
import android.view.WindowInsets
import android.window.WindowContainerToken
import android.window.WindowContainerToken
@@ -65,6 +66,10 @@ private fun getBubbleTransaction(
    }
    }
    if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) {
    if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) {
        wct.setDisableLaunchAdjacent(token, toBubble /* disableLaunchAdjacent */)
        wct.setDisableLaunchAdjacent(token, toBubble /* disableLaunchAdjacent */)
        if (!toBubble) {
            // Clear bounds if moving out of Bubble.
            wct.setBounds(token, Rect())
        }
    }
    }
    if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) {
    if (BubbleAnythingFlagHelper.enableCreateAnyBubbleWithAppCompatFixes()) {
        if (!toBubble && captionInsetsOwner != null) {
        if (!toBubble && captionInsetsOwner != null) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.bubbles.util
package com.android.wm.shell.bubbles.util


import android.app.WindowConfiguration
import android.app.WindowConfiguration
import android.graphics.Rect
import android.os.IBinder
import android.os.IBinder
import android.window.WindowContainerTransaction
import android.window.WindowContainerTransaction
import android.window.WindowContainerTransaction.Change.CHANGE_LAUNCH_NEXT_TO_BUBBLE
import android.window.WindowContainerTransaction.Change.CHANGE_LAUNCH_NEXT_TO_BUBBLE
@@ -99,4 +100,5 @@ fun verifyExitBubbleTransaction(
    assertThat(change.forceExcludedFromRecents).isFalse()
    assertThat(change.forceExcludedFromRecents).isFalse()
    assertThat(change.disablePip).isFalse()
    assertThat(change.disablePip).isFalse()
    assertThat(change.disableLaunchAdjacent).isFalse()
    assertThat(change.disableLaunchAdjacent).isFalse()
    assertThat(change.configuration.windowConfiguration.bounds).isEqualTo(Rect())
}
}