Loading biometrics/fingerprint/2.3/IBiometricsFingerprint.hal +40 −17 Original line number Diff line number Diff line Loading @@ -23,7 +23,24 @@ import @2.2::IBiometricsFingerprint; */ interface IBiometricsFingerprint extends @2.2::IBiometricsFingerprint { /** * Notifies about a finger touching the sensor area. * Returns whether the fingerprint sensor is an under-display fingerprint * sensor. * @param sensorId the unique sensor ID for which the operation should be * performed. * @return isUdfps indicating whether the specified sensor is an * under-display fingerprint sensor. */ isUdfps(uint32_t sensorId) generates (bool isUdfps); /** * Notifies about a touch occurring within the under-display fingerprint * sensor area. * * It it assumed that the device can only have one active under-display * fingerprint sensor at a time. * * If multiple fingers are detected within the sensor area, only the * chronologically first event will be reported. * * @param x The screen x-coordinate of the center of the touch contact area, in * display pixels. Loading @@ -34,10 +51,16 @@ interface IBiometricsFingerprint extends @2.2::IBiometricsFingerprint { * @param major The length of the major axis of an ellipse that describes the * touch area, in display pixels. */ oneway onFingerDown(uint32_t x, uint32_t y, float minor, float major); onFingerDown(uint32_t x, uint32_t y, float minor, float major); /** * Notifies about a finger leaving the sensor area. * Notifies about a finger leaving the under-display fingerprint sensor area. * * It it assumed that the device can only have one active under-display * fingerprint sensor at a time. * * If multiple fingers have left the sensor area, only the finger which * previously caused a "finger down" event will be reported. */ oneway onFingerUp(); onFingerUp(); }; biometrics/fingerprint/2.3/vts/functional/VtsHalBiometricsFingerprintV2_3TargetTest.cpp +13 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #define ASSERT_OK(v) ASSERT_TRUE(v.isOk()) #include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> Loading Loading @@ -41,14 +43,21 @@ class FingerprintHidlTest : public ::testing::TestWithParam<std::string> { sp<IBiometricsFingerprint> mService; }; // This is a one-way method that doesn't return anything. // This method returns true or false depending on the implementation. TEST_P(FingerprintHidlTest, isUdfpsTest) { // Arbitrary ID uint32_t sensorId = 1234; ASSERT_OK(mService->isUdfps(sensorId)); } // This method that doesn't return anything. TEST_P(FingerprintHidlTest, onFingerDownTest) { mService->onFingerDown(1, 2, 3.0f, 4.0f); ASSERT_OK(mService->onFingerDown(1, 2, 3.0f, 4.0f)); } // This is a one-way method that doesn't return anything. // This method that doesn't return anything. TEST_P(FingerprintHidlTest, onFingerUp) { mService->onFingerUp(); ASSERT_OK(mService->onFingerUp()); } } // anonymous namespace Loading Loading
biometrics/fingerprint/2.3/IBiometricsFingerprint.hal +40 −17 Original line number Diff line number Diff line Loading @@ -23,7 +23,24 @@ import @2.2::IBiometricsFingerprint; */ interface IBiometricsFingerprint extends @2.2::IBiometricsFingerprint { /** * Notifies about a finger touching the sensor area. * Returns whether the fingerprint sensor is an under-display fingerprint * sensor. * @param sensorId the unique sensor ID for which the operation should be * performed. * @return isUdfps indicating whether the specified sensor is an * under-display fingerprint sensor. */ isUdfps(uint32_t sensorId) generates (bool isUdfps); /** * Notifies about a touch occurring within the under-display fingerprint * sensor area. * * It it assumed that the device can only have one active under-display * fingerprint sensor at a time. * * If multiple fingers are detected within the sensor area, only the * chronologically first event will be reported. * * @param x The screen x-coordinate of the center of the touch contact area, in * display pixels. Loading @@ -34,10 +51,16 @@ interface IBiometricsFingerprint extends @2.2::IBiometricsFingerprint { * @param major The length of the major axis of an ellipse that describes the * touch area, in display pixels. */ oneway onFingerDown(uint32_t x, uint32_t y, float minor, float major); onFingerDown(uint32_t x, uint32_t y, float minor, float major); /** * Notifies about a finger leaving the sensor area. * Notifies about a finger leaving the under-display fingerprint sensor area. * * It it assumed that the device can only have one active under-display * fingerprint sensor at a time. * * If multiple fingers have left the sensor area, only the finger which * previously caused a "finger down" event will be reported. */ oneway onFingerUp(); onFingerUp(); };
biometrics/fingerprint/2.3/vts/functional/VtsHalBiometricsFingerprintV2_3TargetTest.cpp +13 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #define ASSERT_OK(v) ASSERT_TRUE(v.isOk()) #include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> Loading Loading @@ -41,14 +43,21 @@ class FingerprintHidlTest : public ::testing::TestWithParam<std::string> { sp<IBiometricsFingerprint> mService; }; // This is a one-way method that doesn't return anything. // This method returns true or false depending on the implementation. TEST_P(FingerprintHidlTest, isUdfpsTest) { // Arbitrary ID uint32_t sensorId = 1234; ASSERT_OK(mService->isUdfps(sensorId)); } // This method that doesn't return anything. TEST_P(FingerprintHidlTest, onFingerDownTest) { mService->onFingerDown(1, 2, 3.0f, 4.0f); ASSERT_OK(mService->onFingerDown(1, 2, 3.0f, 4.0f)); } // This is a one-way method that doesn't return anything. // This method that doesn't return anything. TEST_P(FingerprintHidlTest, onFingerUp) { mService->onFingerUp(); ASSERT_OK(mService->onFingerUp()); } } // anonymous namespace Loading