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

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

Clear task bounds when exiting bubble

Remove bounds from task when it is exiting bubble.

Bug: 419344113
Test: atest WMShellUnitTests:BubbleUtilsTest
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: I5db028cc630e6ce3752fff97ac7e4821b50a80da
parent 81e1a87e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.bubbles.util

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

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