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

Commit 0a6888d1 authored by Christine Franks's avatar Christine Franks Committed by Android (Google) Code Review
Browse files

Merge "Add pointer acceleration native APIs"

parents 203ff82d 46d8a1e8
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