Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/util/BubbleUtils.kt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) { Loading libs/WindowManager/Shell/tests/util/src/com/android/wm/shell/bubbles/util/BubbleTestUtils.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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()) } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/util/BubbleUtils.kt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) { Loading
libs/WindowManager/Shell/tests/util/src/com/android/wm/shell/bubbles/util/BubbleTestUtils.kt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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()) } }