mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Add new fields to fingerprint PointerContext
The new fields provide additional information to the HAL about the touch events originating from the framework. Bug: 205915651 Test: m android.hardware.biometrics.common-update-api Test: m android.hardware.biometrics.fingerprint-update-api Test: lunch cf_x86_phone-userdebug && m Change-Id: I987e26ac03e3268eea30feb9bbddffe6ca8d0035
This commit is contained in:
@@ -36,6 +36,6 @@ package android.hardware.biometrics.common;
|
||||
parcelable OperationContext {
|
||||
int id = 0;
|
||||
android.hardware.biometrics.common.OperationReason reason = android.hardware.biometrics.common.OperationReason.UNKNOWN;
|
||||
boolean isAoD = false;
|
||||
boolean isAod = false;
|
||||
boolean isCrypto = false;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ parcelable OperationContext {
|
||||
*/
|
||||
OperationReason reason = OperationReason.UNKNOWN;
|
||||
|
||||
/* Flag indicating that the display is in AoD mode. */
|
||||
boolean isAoD = false;
|
||||
/* Flag indicating that the display is in AOD mode. */
|
||||
boolean isAod = false;
|
||||
|
||||
/** Flag indicating that crypto was requested. */
|
||||
boolean isCrypto = false;
|
||||
|
||||
@@ -34,10 +34,13 @@
|
||||
package android.hardware.biometrics.fingerprint;
|
||||
@VintfStability
|
||||
parcelable PointerContext {
|
||||
int pointerId = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int pointerId = -1;
|
||||
float x = 0.000000f;
|
||||
float y = 0.000000f;
|
||||
float minor = 0.000000f;
|
||||
float major = 0.000000f;
|
||||
boolean isAoD = false;
|
||||
float orientation = 0.000000f;
|
||||
boolean isAod = false;
|
||||
long time = 0;
|
||||
long gestureStart = 0;
|
||||
}
|
||||
|
||||
@@ -21,14 +21,35 @@ package android.hardware.biometrics.fingerprint;
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable PointerContext {
|
||||
/* See android.view.MotionEvent#getPointerId. */
|
||||
int pointerId = 0;
|
||||
/**
|
||||
* Pointer ID obtained from MotionEvent#getPointerId or -1 if the ID cannot be obtained, for
|
||||
* example if this event originated from a low-level wake-up gesture.
|
||||
*
|
||||
* See android.view.MotionEvent#getPointerId.
|
||||
*/
|
||||
int pointerId = -1;
|
||||
|
||||
/* The distance in pixels from the left edge of the display. */
|
||||
int x = 0;
|
||||
/**
|
||||
* The distance in pixels from the left edge of the display.
|
||||
*
|
||||
* This is obtained from MotionEvent#getRawX and translated relative to Surface#ROTATION_0.
|
||||
* Meaning, this value is always reported as if the device is in its natural (e.g. portrait)
|
||||
* orientation.
|
||||
*
|
||||
* See android.view.MotionEvent#getRawX.
|
||||
*/
|
||||
float x = 0f;
|
||||
|
||||
/* The distance in pixels from the top edge of the display. */
|
||||
int y = 0;
|
||||
/**
|
||||
* The distance in pixels from the top edge of the display.
|
||||
*
|
||||
* This is obtained from MotionEvent#getRawY and translated relative to Surface#ROTATION_0.
|
||||
* Meaning, this value is always reported as if the device is in its natural (e.g. portrait)
|
||||
* orientation.
|
||||
*
|
||||
* See android.view.MotionEvent#getRawY.
|
||||
*/
|
||||
float y = 0f;
|
||||
|
||||
/* See android.view.MotionEvent#getTouchMinor. */
|
||||
float minor = 0f;
|
||||
@@ -36,6 +57,32 @@ parcelable PointerContext {
|
||||
/* See android.view.MotionEvent#getTouchMajor. */
|
||||
float major = 0f;
|
||||
|
||||
/* Flag indicating that the display is in AoD mode. */
|
||||
boolean isAoD = false;
|
||||
/* See android.view.MotionEvent#getOrientation. */
|
||||
float orientation = 0f;
|
||||
|
||||
/* Flag indicating that the display is in AOD mode. */
|
||||
boolean isAod = false;
|
||||
|
||||
/**
|
||||
* The time of the user interaction that produced this event, in milliseconds.
|
||||
*
|
||||
* This is obtained from MotionEvent#getEventTime, which uses SystemClock.uptimeMillis() as
|
||||
* the clock.
|
||||
*
|
||||
* See android.view.MotionEvent#getEventTime
|
||||
*/
|
||||
long time = 0;
|
||||
|
||||
/**
|
||||
* The time of the first user interaction in this gesture, in milliseconds.
|
||||
*
|
||||
* If this event is MotionEvent#ACTION_DOWN, it means it's the first event in this gesture,
|
||||
* and `gestureStart` will be equal to `time`.
|
||||
*
|
||||
* This is obtained from MotionEvent#getDownTime, which uses SystemClock.uptimeMillis() as
|
||||
* the clock.
|
||||
*
|
||||
* See android.view.MotionEvent#getDownTime
|
||||
*/
|
||||
long gestureStart = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user