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

Commit 82d47db4 authored by Dan Albert's avatar Dan Albert Committed by android-build-merger
Browse files

Merge "Clean up warnings in inputflinger." am: f3606ef2

am: ca5ad095

* commit 'ca5ad095':
  Clean up warnings in inputflinger.
parents f4acff7c ca5ad095
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static bool isValidMotionAction(int32_t action, int32_t actionButton, int32_t po
    case AMOTION_EVENT_ACTION_POINTER_DOWN:
    case AMOTION_EVENT_ACTION_POINTER_UP: {
        int32_t index = getMotionEventActionPointerIndex(action);
        return index >= 0 && size_t(index) < pointerCount;
        return index >= 0 && index < pointerCount;
    }
    case AMOTION_EVENT_ACTION_BUTTON_PRESS:
    case AMOTION_EVENT_ACTION_BUTTON_RELEASE:
+2 −2
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ TEST_F(InputDispatcherTest, InjectInputEvent_ValidatesMotionEvents) {
            << "Should reject motion events with pointer down index too large.";

    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
            AMOTION_EVENT_ACTION_POINTER_DOWN | (-1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
            AMOTION_EVENT_ACTION_POINTER_DOWN | (~1U << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
            0, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
            ARBITRARY_TIME, ARBITRARY_TIME,
            /*pointerCount*/ 1, pointerProperties, pointerCoords);
@@ -191,7 +191,7 @@ TEST_F(InputDispatcherTest, InjectInputEvent_ValidatesMotionEvents) {
            << "Should reject motion events with pointer up index too large.";

    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
            AMOTION_EVENT_ACTION_POINTER_UP | (-1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
            AMOTION_EVENT_ACTION_POINTER_UP | (~1U << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
            0, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
            ARBITRARY_TIME, ARBITRARY_TIME,
            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+2 −2
Original line number Diff line number Diff line
@@ -1528,8 +1528,8 @@ TEST_F(SwitchInputMapperTest, Process) {
    NotifySwitchArgs args;
    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifySwitchWasCalled(&args));
    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
    ASSERT_EQ((1 << SW_LID) | (1 << SW_JACK_PHYSICAL_INSERT), args.switchValues);
    ASSERT_EQ((1 << SW_LID) | (1 << SW_JACK_PHYSICAL_INSERT) | (1 << SW_HEADPHONE_INSERT),
    ASSERT_EQ((1U << SW_LID) | (1U << SW_JACK_PHYSICAL_INSERT), args.switchValues);
    ASSERT_EQ((1U << SW_LID) | (1U << SW_JACK_PHYSICAL_INSERT) | (1 << SW_HEADPHONE_INSERT),
            args.switchMask);
    ASSERT_EQ(uint32_t(0), args.policyFlags);
}