From 62b1f71402d462b9da553bd20c7de766ad820980 Mon Sep 17 00:00:00 2001 From: Yi-Ling Chuang Date: Sat, 22 Jan 2022 17:25:52 +0800 Subject: [PATCH] Fix ContextualCardsFragment test failure Fixes: 215046286 Test: robotest Change-Id: I930c3009891512011974aa399b9a4034d33243e5 --- .../homepage/contextualcards/ContextualCardsFragmentTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardsFragmentTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardsFragmentTest.java index e6aeea76e30..e71af57b44b 100644 --- a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardsFragmentTest.java +++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardsFragmentTest.java @@ -41,7 +41,6 @@ import com.android.settings.testutils.FakeFeatureFactory; import com.android.settings.testutils.shadow.ShadowFragment; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -75,12 +74,11 @@ public class ContextualCardsFragmentTest { } @Test - @Ignore public void onStart_shouldRegisterBothReceivers() { mFragment.onStart(); verify(mActivity).registerReceiver(eq(mFragment.mKeyEventReceiver), - any(IntentFilter.class)); + any(IntentFilter.class), eq(Context.RECEIVER_EXPORTED)); verify(mActivity).registerReceiver(eq(mFragment.mScreenOffReceiver), any(IntentFilter.class)); }