diff --git a/interfaces/fingerprints/extension/1.0/Android.bp b/interfaces/fingerprints/extension/1.0/Android.bp index b1b6359..a3e8840 100644 --- a/interfaces/fingerprints/extension/1.0/Android.bp +++ b/interfaces/fingerprints/extension/1.0/Android.bp @@ -5,6 +5,7 @@ hidl_interface { root: "com.fingerprints", system_ext_specific: true, srcs: [ + "types.hal", "ICalibrationCallback.hal", "ICryptCallback.hal", "IFingerprintAuthenticator.hal", diff --git a/interfaces/fingerprints/extension/1.0/IFingerprintEngineering.hal b/interfaces/fingerprints/extension/1.0/IFingerprintEngineering.hal index e39998d..cd5d5d1 100644 --- a/interfaces/fingerprints/extension/1.0/IFingerprintEngineering.hal +++ b/interfaces/fingerprints/extension/1.0/IFingerprintEngineering.hal @@ -13,12 +13,7 @@ import ICalibrationCallback; import IIlluminationTuningCallback; interface IFingerprintEngineering { - struct SensorSize { - int32_t width; - int32_t height; - }; - - getSensorSize() generates (SensorSize sensorSize); + getSensorSize() generates (SensorSize sensorSize); oneway startImageSubscription(IImageCaptureCallback callback); diff --git a/interfaces/fingerprints/extension/1.0/IFingerprintNavigation.hal b/interfaces/fingerprints/extension/1.0/IFingerprintNavigation.hal index 5c04a99..b9960cd 100644 --- a/interfaces/fingerprints/extension/1.0/IFingerprintNavigation.hal +++ b/interfaces/fingerprints/extension/1.0/IFingerprintNavigation.hal @@ -7,15 +7,6 @@ package com.fingerprints.extension@1.0; interface IFingerprintNavigation { - struct NavigationConfig { - int32_t tapNoImageMaxThreshold; - int32_t holdNoImageMinThreshold; - int32_t doubleClickTimeInterval; - int32_t tapImageTransMaxThreshold; - int32_t swipeImageTransMinThreshold; - int32_t backGroundAlgo; - }; - setNavigation(bool enabled); getNavigationConfig() generates (NavigationConfig navigationConfig); diff --git a/interfaces/fingerprints/extension/1.0/IFingerprintOptical.hal b/interfaces/fingerprints/extension/1.0/IFingerprintOptical.hal index 2383112..b55bf52 100644 --- a/interfaces/fingerprints/extension/1.0/IFingerprintOptical.hal +++ b/interfaces/fingerprints/extension/1.0/IFingerprintOptical.hal @@ -9,27 +9,6 @@ package com.fingerprints.extension@1.0; import IFingerprintOpticalCallback; interface IFingerprintOptical { - struct HotZoneData { - int32_t left; - int32_t right; - int32_t top; - int32_t bottom; - int32_t update; - }; - - struct TouchEventData { - int32_t hotzone_top; - int32_t hotzone_left; - int32_t hotzone_right; - int32_t hotzone_bottom; - int32_t pos_x; - int32_t pos_y; - float pressure; - float size; - int32_t major; - int32_t minor; - }; - oneway setNotify(IFingerprintOpticalCallback callback); oneway setIlluminationStatus(uint32_t value); diff --git a/interfaces/fingerprints/extension/1.0/IFingerprintSenseTouch.hal b/interfaces/fingerprints/extension/1.0/IFingerprintSenseTouch.hal index 07d1406..1bbdf1c 100644 --- a/interfaces/fingerprints/extension/1.0/IFingerprintSenseTouch.hal +++ b/interfaces/fingerprints/extension/1.0/IFingerprintSenseTouch.hal @@ -7,17 +7,6 @@ package com.fingerprints.extension@1.0; interface IFingerprintSenseTouch { - struct SenseTouchConfig { - bool success; - int32_t version; - int32_t ground; - int32_t triggerThreshold; - int32_t untriggerThreshold; - bool authTriggerOnDown; - bool authTriggerOnUp; - int32_t authButtonTimeoutMs; - }; - getForce() generates (int32_t force); isSupported() generates (bool isSupported); diff --git a/interfaces/fingerprints/extension/1.0/IFingerprintSensorTest.hal b/interfaces/fingerprints/extension/1.0/IFingerprintSensorTest.hal index 17c33f5..d257076 100644 --- a/interfaces/fingerprints/extension/1.0/IFingerprintSensorTest.hal +++ b/interfaces/fingerprints/extension/1.0/IFingerprintSensorTest.hal @@ -10,35 +10,6 @@ import ISensorTestCaptureCallback; import ISensorTestCallback; interface IFingerprintSensorTest { - struct SensorInfo { - int32_t sensorDieValidFlag; - int32_t hardwareId; - string lotId; - int32_t waferId; - int32_t waferPositionX; - int32_t waferPositionY; - string productionTimestamp; - int32_t companionDieValidFlag; - int32_t companionChipHardwareId; - string companionChipLotId; - int32_t vendorHwValidFlag; - vec vendorData; - int32_t totalNumOtpBitErrors; - int32_t maxNumOtpBitErrorsInByte; - int32_t productType; - }; - - struct SensorTest { - string name; - string description; - bool waitForFingerDown; - string rubberStampType; - }; - - struct SensorTestInput { - string testLimitsKeyValuePair; - }; - getSensorInfo() generates (SensorInfo sensorInfo); getSensorTests() generates (vec sensorTests); diff --git a/interfaces/fingerprints/extension/1.0/IImageCaptureCallback.hal b/interfaces/fingerprints/extension/1.0/IImageCaptureCallback.hal index d709a2b..b7f4074 100644 --- a/interfaces/fingerprints/extension/1.0/IImageCaptureCallback.hal +++ b/interfaces/fingerprints/extension/1.0/IImageCaptureCallback.hal @@ -7,21 +7,6 @@ package com.fingerprints.extension@1.0; interface IImageCaptureCallback { - struct ImageCaptureData { - int32_t mode; - int32_t captureResult; - int32_t identifyResult; - int32_t templateUpdateResult; - int32_t enrollResult; - int32_t cacResult; - int32_t userId; - int32_t remainingSamples; - int32_t coverage; - int32_t quality; - vec rawImage; - vec enhancedImage; - }; - oneway onImage(ImageCaptureData imageCaptureData); oneway onImageTransferData(uint8_t type, vec buffer); diff --git a/interfaces/fingerprints/extension/1.0/ISensorTestCallback.hal b/interfaces/fingerprints/extension/1.0/ISensorTestCallback.hal index ab76c8d..3df7f59 100644 --- a/interfaces/fingerprints/extension/1.0/ISensorTestCallback.hal +++ b/interfaces/fingerprints/extension/1.0/ISensorTestCallback.hal @@ -7,15 +7,6 @@ package com.fingerprints.extension@1.0; interface ISensorTestCallback { - struct SensorTestResult { - int32_t resultCode; - string resultString; - int32_t errorCode; - string errorString; - vec imageData; - string log; - }; - oneway onResult(SensorTestResult result); onResultInit(uint32_t resultCode, uint32_t errorCode, bool imageFetched) generates (int32_t result); diff --git a/interfaces/fingerprints/extension/1.0/types.hal b/interfaces/fingerprints/extension/1.0/types.hal new file mode 100644 index 0000000..f16e5d4 --- /dev/null +++ b/interfaces/fingerprints/extension/1.0/types.hal @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.fingerprints.extension@1.0; + +struct HotZoneData { + int32_t left; + int32_t right; + int32_t top; + int32_t bottom; + int32_t update; +}; + +struct ImageCaptureData { + int32_t mode; + int32_t captureResult; + int32_t identifyResult; + int32_t templateUpdateResult; + int32_t enrollResult; + int32_t cacResult; + int32_t userId; + int32_t remainingSamples; + int32_t coverage; + int32_t quality; + vec rawImage; + vec enhancedImage; +}; + +struct NavigationConfig { + int32_t tapNoImageMaxThreshold; + int32_t holdNoImageMinThreshold; + int32_t doubleClickTimeInterval; + int32_t tapImageTransMaxThreshold; + int32_t swipeImageTransMinThreshold; + int32_t backGroundAlgo; +}; + +struct SensorInfo { + int32_t sensorDieValidFlag; + int32_t hardwareId; + string lotId; + int32_t waferId; + int32_t waferPositionX; + int32_t waferPositionY; + string productionTimestamp; + int32_t companionDieValidFlag; + int32_t companionChipHardwareId; + string companionChipLotId; + int32_t vendorHwValidFlag; + vec vendorData; + int32_t totalNumOtpBitErrors; + int32_t maxNumOtpBitErrorsInByte; + int32_t productType; +}; + +struct SensorSize { + int32_t width; + int32_t height; +}; + +struct SensorTest { + string name; + string description; + bool waitForFingerDown; + string rubberStampType; +}; + +struct SensorTestInput { + string testLimitsKeyValuePair; +}; + +struct SensorTestResult { + int32_t resultCode; + string resultString; + int32_t errorCode; + string errorString; + vec imageData; + string log; +}; + +struct SenseTouchConfig { + bool success; + int32_t version; + int32_t ground; + int32_t triggerThreshold; + int32_t untriggerThreshold; + bool authTriggerOnDown; + bool authTriggerOnUp; + int32_t authButtonTimeoutMs; +}; + +struct TouchEventData { + int32_t hotzone_top; + int32_t hotzone_left; + int32_t hotzone_right; + int32_t hotzone_bottom; + int32_t pos_x; + int32_t pos_y; + float pressure; + float size; + int32_t major; + int32_t minor; +};