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

Commit 46d8a1e8 authored by Christine Franks's avatar Christine Franks
Browse files

Add pointer acceleration native APIs

Bug: 202273865
Test: manual
Change-Id: I61cca8e313f183ff421147d25f11819959e4345a
parent 6db68e1d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -95,4 +95,7 @@ interface IInputConstants
         */
        INTERCEPTS_STYLUS = 0x00000040,
    }

    /* The default pointer acceleration value. */
    const int DEFAULT_POINTER_ACCELERATION = 3;
}
+5 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#ifndef _UI_INPUT_READER_BASE_H
#define _UI_INPUT_READER_BASE_H

#include <android/os/IInputConstants.h>
#include <input/DisplayViewport.h>
#include <input/Input.h>
#include <input/InputDevice.h>
@@ -288,7 +289,10 @@ struct InputReaderConfiguration {

    InputReaderConfiguration()
          : virtualKeyQuietTime(0),
            pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, 3.0f),
            pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f,
                                             static_cast<float>(
                                                     android::os::IInputConstants::
                                                             DEFAULT_POINTER_ACCELERATION)),
            wheelVelocityControlParameters(1.0f, 15.0f, 50.0f, 4.0f),
            pointerGesturesEnabled(true),
            pointerGestureQuietInterval(100 * 1000000LL),            // 100 ms