diff options
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotDetectionControllerTest.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotDetectionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotDetectionControllerTest.kt index 08b5d2bdc31c..16091b2633aa 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotDetectionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ScreenshotDetectionControllerTest.kt @@ -170,8 +170,8 @@ class ScreenshotDetectionControllerTest { private class ComponentInfoFlagMatcher( @PackageManager.ComponentInfoFlagsBits val mask: Int, val value: Int ): ArgumentMatcher<PackageManager.ComponentInfoFlags> { - override fun matches(flags: PackageManager.ComponentInfoFlags): Boolean { - return (mask.toLong() and flags.value) == value.toLong() + override fun matches(flags: PackageManager.ComponentInfoFlags?): Boolean { + return flags != null && (mask.toLong() and flags.value) == value.toLong() } override fun toString(): String{ |