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

Commit 915b3152 authored by Omar Abdelmonem's avatar Omar Abdelmonem Committed by Android (Google) Code Review
Browse files

Merge "Create JNI pipeline for touchpad gestures" into main

parents e724b529 5ebf21f3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -466,6 +466,9 @@ public:
    virtual void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs,
                                             int32_t deviceId) = 0;

    /* Sends the Info of gestures that happen on the touchpad. */
    virtual void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) = 0;

    /* Gets the keyboard layout for a particular input device. */
    virtual std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay(
            const InputDeviceIdentifier& identifier,
+3 −0
Original line number Diff line number Diff line
@@ -480,6 +480,9 @@ void TouchpadInputMapper::consumeGesture(const Gesture* gesture) {
        return;
    }
    mGesturesToProcess.push_back(*gesture);
    if (mTouchpadHardwareStateNotificationsEnabled) {
        getPolicy()->notifyTouchpadGestureInfo(gesture->type, getDeviceId());
    }
}

std::list<NotifyArgs> TouchpadInputMapper::processGestures(nsecs_t when, nsecs_t readTime) {
+4 −0
Original line number Diff line number Diff line
@@ -256,6 +256,10 @@ void FakeInputReaderPolicy::notifyTouchpadHardwareState(const SelfContainedHardw
    mTouchpadHardwareStateNotified.notify_all();
}

void FakeInputReaderPolicy::notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) {
    std::scoped_lock lock(mLock);
}

std::shared_ptr<KeyCharacterMap> FakeInputReaderPolicy::getKeyboardLayoutOverlay(
        const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) {
    return nullptr;
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ private:
    void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override;
    void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs,
                                     int32_t deviceId) override;
    void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override;
    std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay(
            const InputDeviceIdentifier&, const std::optional<KeyboardLayoutInfo>) override;
    std::string getDeviceAlias(const InputDeviceIdentifier&) override;
+1 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ public:
    void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override {}
    void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs,
                                     int32_t deviceId) override {}
    void notifyTouchpadGestureInfo(GestureType type, int32_t deviceId) override {}
    std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay(
            const InputDeviceIdentifier& identifier,
            const std::optional<KeyboardLayoutInfo> layoutInfo) override {