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

Commit ba1fbf09 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Automerger Merge Worker
Browse files

Merge changes Ibb8af342,I085b6aeb am: 347e9d52 am: 52ca4688 am: 085f6755 am: 9d10e54b

parents ff63b6bd 9d10e54b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1053,6 +1053,10 @@ void TouchInputMapper::configureInputDevice(nsecs_t when, bool* outResetNeeded)
            mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE);
        }
    } else {
        if (mPointerController != nullptr && mDeviceMode == DeviceMode::DIRECT &&
            !mConfig.showTouches) {
            mPointerController->clearSpots();
        }
        mPointerController.reset();
    }

+10 −2
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ private:
        mSpotsByDisplay[displayId] = newSpots;
    }

    void clearSpots() override {}
    void clearSpots() override { mSpotsByDisplay.clear(); }

    std::map<int32_t, std::vector<int32_t>> mSpotsByDisplay;
};
@@ -8620,7 +8620,8 @@ TEST_F(MultiTouchInputMapperTest, Process_Pointer_ShowTouches) {

    // Default device will reconfigure above, need additional reconfiguration for another device.
    device2->configure(ARBITRARY_TIME, mFakePolicy->getReaderConfiguration(),
                       InputReaderConfiguration::CHANGE_DISPLAY_INFO);
                       InputReaderConfiguration::CHANGE_DISPLAY_INFO |
                               InputReaderConfiguration::CHANGE_SHOW_TOUCHES);

    // Two fingers down at default display.
    int32_t x1 = 100, y1 = 125, x2 = 300, y2 = 500;
@@ -8647,6 +8648,13 @@ TEST_F(MultiTouchInputMapperTest, Process_Pointer_ShowTouches) {
    iter = fakePointerController->getSpots().find(SECONDARY_DISPLAY_ID);
    ASSERT_TRUE(iter != fakePointerController->getSpots().end());
    ASSERT_EQ(size_t(2), iter->second.size());

    // Disable the show touches configuration and ensure the spots are cleared.
    mFakePolicy->setShowTouches(false);
    device2->configure(ARBITRARY_TIME, mFakePolicy->getReaderConfiguration(),
                       InputReaderConfiguration::CHANGE_SHOW_TOUCHES);

    ASSERT_TRUE(fakePointerController->getSpots().empty());
}

TEST_F(MultiTouchInputMapperTest, VideoFrames_ReceivedByListener) {