Fix runtime kotlin nullable error in ScreenshotDetectionControllerTest
Fix a kotlin nullable error that shows up at runtime due to changes
in where kotlin puts implicit null checks when the @NonNull and
@Nullable annotations are fixed to be class retention:
java.lang.NullPointerException: Parameter specified as non-null is null: method com.android.systemui.screenshot.ScreenshotDetectionControllerTest$ComponentInfoFlagMatcher.matches, parameter flags
at com.android.systemui.screenshot.ScreenshotDetectionControllerTest$ComponentInfoFlagMatcher.matches(Unknown Source:2)
at com.android.systemui.screenshot.ScreenshotDetectionControllerTest$ComponentInfoFlagMatcher.matches(ScreenshotDetectionControllerTest.kt:170)
at org.mockito.internal.invocation.TypeSafeMatching.apply(TypeSafeMatching.java:24)
at org.mockito.internal.invocation.MatcherApplicationStrategy.forEachMatcherAndArgument(MatcherApplicationStrategy.java:83)
at org.mockito.internal.invocation.InvocationMatcher.argumentsMatch(InvocationMatcher.java:152)
at org.mockito.internal.invocation.InvocationMatcher.matches(InvocationMatcher.java:81)
at org.mockito.internal.stubbing.InvocationContainerImpl.findAnswerFor(InvocationContainerImpl.java:91)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:87)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:35)
at com.android.dx.mockito.inline.InvocationHandlerAdapter.interceptEntryHook(InvocationHandlerAdapter.java:75)
at com.android.dx.mockito.inline.MockMethodAdvice.handle(MockMethodAdvice.java:201)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.dx.mockito.inline.MockMethodDispatcher.handle(MockMethodDispatcher.java:79)
at android.content.pm.PackageManager.getActivityInfo(Unknown Source:41)
at com.android.systemui.screenshot.ScreenshotDetectionControllerTest.testMaybeNotifyOfScreenshot_disabledApp(ScreenshotDetectionControllerTest.kt:199)
Bug: 294110802
Test: atest SystemUITests
Change-Id: I4b68fdbc779ec8c0bcbd4e9efbdffbd5edcdf427
Merged-In: I4b68fdbc779ec8c0bcbd4e9efbdffbd5edcdf427
(cherry picked from commit e6fb02cee287e2020482e27411faff6461e6a0a3)
1 file changed