Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleControllerTest.kt +48 −8 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ import com.android.wm.shell.transition.Transitions.TRANSIT_CONVERT_TO_BUBBLE import com.android.wm.shell.transition.Transitions.TransitionHandler import com.android.wm.shell.unfold.ShellUnfoldProgressProvider import com.google.common.truth.Truth.assertThat import com.google.common.truth.Truth.assertWithMessage import com.google.common.util.concurrent.MoreExecutors.directExecutor import java.util.Optional import java.util.concurrent.Executor Loading Loading @@ -423,8 +424,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading @@ -438,8 +439,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading @@ -452,8 +453,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading Loading @@ -527,8 +528,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading Loading @@ -859,6 +860,45 @@ class BubbleControllerTest(flags: FlagsParameterization) { assertThat(bubbleController.layerView!!.visibility).isEqualTo(View.INVISIBLE) } @Test fun testOnThemeChanged_skipInflationForOverflowBubbles() { val taskInfo1 = ActivityManager.RunningTaskInfo().apply { taskId = 123 baseActivity = COMPONENT } val bubble = createAppBubble(taskInfo1) val taskInfo2 = ActivityManager.RunningTaskInfo().apply { taskId = 124 baseActivity = COMPONENT } val overflowBubble = createAppBubble(taskInfo2) getInstrumentation().runOnMainSync { bubbleController.inflateAndAdd( bubble, /* suppressFlyout= */ true, /* showInShade= */ true ) bubbleController.inflateAndAdd( overflowBubble, /* suppressFlyout= */ true, /* showInShade= */ true ) bubbleController.dismissBubble(overflowBubble, DISMISS_USER_GESTURE) } assertThat(bubbleData.hasBubbles()).isTrue() assertThat(bubbleData.hasOverflowBubbles()).isTrue() assertWithMessage("Overflow bubble should not be inflated since it's dismissed") .that(overflowBubble.isInflated).isFalse() getInstrumentation().runOnMainSync { bubbleController.onThemeChanged() } assertWithMessage("Overflow bubble should not be inflated even if #onThemeChanged") .that(overflowBubble.isInflated).isFalse() } private fun createBubble(key: String, taskId: Int = 0): Bubble { val icon = Icon.createWithResource(context.resources, R.drawable.bubble_ic_overflow_button) val shortcutInfo = ShortcutInfo.Builder(context, "fakeId").setIcon(icon).build() Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1374,7 +1374,7 @@ public class BubbleController implements ConfigurationChangeListener, mLayerView, mBubbleIconFactory, mAppInfoProvider, false /* skipInflation */); true /* skipInflation */); } } Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissAllCollapsedBubbleAppsTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.device.apphelpers.MessagingAppHelper import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -56,7 +55,6 @@ import org.junit.runners.Parameterized * - [BubbleFlickerTestBase] * - [BubbleDismissesTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissExpandedBubbleViaBubbleBarTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.tools.NavBar import android.tools.device.apphelpers.MessagingAppHelper import android.tools.traces.component.ComponentNameMatcher.Companion.LAUNCHER import android.tools.traces.component.IComponentNameMatcher import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -65,7 +64,6 @@ import org.junit.runners.Parameterized * - [BubbleAlwaysVisibleTestCases] * - [BubbleAppBecomesNotExpandedTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/LaunchMultipleBubbleTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.platform.systemui_tapl.ui.Root import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -58,7 +57,6 @@ import org.junit.runners.Parameterized * - [BubbleFlickerTestBase] * - [MultipleBubbleExpandBubbleAppTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubbleControllerTest.kt +48 −8 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ import com.android.wm.shell.transition.Transitions.TRANSIT_CONVERT_TO_BUBBLE import com.android.wm.shell.transition.Transitions.TransitionHandler import com.android.wm.shell.unfold.ShellUnfoldProgressProvider import com.google.common.truth.Truth.assertThat import com.google.common.truth.Truth.assertWithMessage import com.google.common.util.concurrent.MoreExecutors.directExecutor import java.util.Optional import java.util.concurrent.Executor Loading Loading @@ -423,8 +424,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading @@ -438,8 +439,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading @@ -452,8 +453,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading Loading @@ -527,8 +528,8 @@ class BubbleControllerTest(flags: FlagsParameterization) { getInstrumentation().runOnMainSync { bubbleData.notificationEntryUpdated( bubble, true /* suppressFlyout */, true /* showInShade= */, true, /* suppressFlyout */ true, /* showInShade= */ ) } Loading Loading @@ -859,6 +860,45 @@ class BubbleControllerTest(flags: FlagsParameterization) { assertThat(bubbleController.layerView!!.visibility).isEqualTo(View.INVISIBLE) } @Test fun testOnThemeChanged_skipInflationForOverflowBubbles() { val taskInfo1 = ActivityManager.RunningTaskInfo().apply { taskId = 123 baseActivity = COMPONENT } val bubble = createAppBubble(taskInfo1) val taskInfo2 = ActivityManager.RunningTaskInfo().apply { taskId = 124 baseActivity = COMPONENT } val overflowBubble = createAppBubble(taskInfo2) getInstrumentation().runOnMainSync { bubbleController.inflateAndAdd( bubble, /* suppressFlyout= */ true, /* showInShade= */ true ) bubbleController.inflateAndAdd( overflowBubble, /* suppressFlyout= */ true, /* showInShade= */ true ) bubbleController.dismissBubble(overflowBubble, DISMISS_USER_GESTURE) } assertThat(bubbleData.hasBubbles()).isTrue() assertThat(bubbleData.hasOverflowBubbles()).isTrue() assertWithMessage("Overflow bubble should not be inflated since it's dismissed") .that(overflowBubble.isInflated).isFalse() getInstrumentation().runOnMainSync { bubbleController.onThemeChanged() } assertWithMessage("Overflow bubble should not be inflated even if #onThemeChanged") .that(overflowBubble.isInflated).isFalse() } private fun createBubble(key: String, taskId: Int = 0): Bubble { val icon = Icon.createWithResource(context.resources, R.drawable.bubble_ic_overflow_button) val shortcutInfo = ShortcutInfo.Builder(context, "fakeId").setIcon(icon).build() Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1374,7 +1374,7 @@ public class BubbleController implements ConfigurationChangeListener, mLayerView, mBubbleIconFactory, mAppInfoProvider, false /* skipInflation */); true /* skipInflation */); } } Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissAllCollapsedBubbleAppsTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.device.apphelpers.MessagingAppHelper import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -56,7 +55,6 @@ import org.junit.runners.Parameterized * - [BubbleFlickerTestBase] * - [BubbleDismissesTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissExpandedBubbleViaBubbleBarTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.tools.NavBar import android.tools.device.apphelpers.MessagingAppHelper import android.tools.traces.component.ComponentNameMatcher.Companion.LAUNCHER import android.tools.traces.component.IComponentNameMatcher import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -65,7 +64,6 @@ import org.junit.runners.Parameterized * - [BubbleAlwaysVisibleTestCases] * - [BubbleAppBecomesNotExpandedTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/LaunchMultipleBubbleTest.kt +0 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.platform.systemui_tapl.ui.Root import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils Loading Loading @@ -58,7 +57,6 @@ import org.junit.runners.Parameterized * - [BubbleFlickerTestBase] * - [MultipleBubbleExpandBubbleAppTestCases] */ @FlakyTest(bugId = 430273288) @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading