Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 825c259c authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Treat kotlin warnings as errors in InputTests

This will ensure that all warnings are addressed when the code is first
submitted.

Bug: 271455682
Bug: 439992405
Test: atest InputTests
Flag: EXEMPT PURE_REFACTOR
Change-Id: I791cb9d6fc118b24f54d65c8df831c676676bcdf
parent d77a1be6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ android_test {
        "src/**/*.java",
        "src/**/*.kt",
    ],
    kotlincflags: [
        "-Werror",
    ],
    asset_dirs: ["assets"],
    platform_apis: true,
    certificate: "platform",
+6 −4
Original line number Diff line number Diff line
@@ -299,10 +299,12 @@ class KeyGestureControllerTests {
                },
            )
        Mockito.`when`(inputManager.registerKeyGestureEventHandler(any(), any())).thenAnswer {
            val args = it.arguments
            if (args[0] != null) {
                val gestures = args[0] as List<Int>
                val handler = args[1] as InputManager.KeyGestureEventHandler
            val gestures = it.getArgument<List<Int>>(0)
            if (gestures != null) {
                val handler = it.getArgument<InputManager.KeyGestureEventHandler>(1)
                requireNotNull(handler) {
                    "Handler argument cannot be null when gestures are provided"
                }
                keyGestureController.registerKeyGestureHandler(
                    gestures.toIntArray(),
                    KeyGestureHandler { event, token ->