From 98d02e7108226e63a688bb65667622c7c9c2fdaa Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 14 Dec 2022 09:31:17 -0800 Subject: [PATCH] Handle inconsistent ordering of intent filter arguments Ensure both filter actions are found but assume any order. Test: treehugger Bug: 262574315 Change-Id: I248f5dd70683b36109b35f511067c42a44b24120 --- .../src/com/android/systemui/wmshell/BubblesTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java index d31f0bbf49af3..2aed831211ed0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java @@ -1332,10 +1332,10 @@ public class BubblesTest extends SysuiTestCase { mBubbleController.updateBubble(mBubbleEntry); verify(mContext).registerReceiver(mBroadcastReceiverArgumentCaptor.capture(), mFilterArgumentCaptor.capture(), eq(Context.RECEIVER_EXPORTED)); - assertThat(mFilterArgumentCaptor.getValue().getAction(0)).isEqualTo( - Intent.ACTION_CLOSE_SYSTEM_DIALOGS); - assertThat(mFilterArgumentCaptor.getValue().getAction(1)).isEqualTo( - Intent.ACTION_SCREEN_OFF); + assertThat(mFilterArgumentCaptor.getValue() + .hasAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)).isTrue(); + assertThat(mFilterArgumentCaptor.getValue() + .hasAction(Intent.ACTION_SCREEN_OFF)).isTrue(); mBubbleData.dismissBubbleWithKey(mBubbleEntry.getKey(), REASON_APP_CANCEL); // TODO: not certain why this isn't called normally when tests are run, perhaps because