mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Define biometrics.fingerprint@2.3
This HIDL introduces onFingerDown and onFingerUp methods. Bug: 158135499 Test: build Change-Id: If2bfd70ee518b3f980ed2dc36a2df2a1ccf3afce
This commit is contained in:
18
biometrics/fingerprint/2.3/Android.bp
Normal file
18
biometrics/fingerprint/2.3/Android.bp
Normal file
@@ -0,0 +1,18 @@
|
||||
// This file is autogenerated by hidl-gen -Landroidbp.
|
||||
|
||||
hidl_interface {
|
||||
name: "android.hardware.biometrics.fingerprint@2.3",
|
||||
root: "android.hardware",
|
||||
vndk: {
|
||||
enabled: true,
|
||||
},
|
||||
srcs: [
|
||||
"IBiometricsFingerprint.hal",
|
||||
],
|
||||
interfaces: [
|
||||
"android.hardware.biometrics.fingerprint@2.1",
|
||||
"android.hardware.biometrics.fingerprint@2.2",
|
||||
"android.hidl.base@1.0",
|
||||
],
|
||||
gen_java: true,
|
||||
}
|
||||
43
biometrics/fingerprint/2.3/IBiometricsFingerprint.hal
Normal file
43
biometrics/fingerprint/2.3/IBiometricsFingerprint.hal
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.biometrics.fingerprint@2.3;
|
||||
|
||||
import @2.2::IBiometricsFingerprint;
|
||||
|
||||
/**
|
||||
* The interface for biometric fingerprint authentication.
|
||||
*/
|
||||
interface IBiometricsFingerprint extends @2.2::IBiometricsFingerprint {
|
||||
/**
|
||||
* Notifies about a finger touching the sensor area.
|
||||
*
|
||||
* @param x The screen x-coordinate of the center of the touch contact area, in
|
||||
* display pixels.
|
||||
* @param y The screen y-coordinate of the center of the touch contact area, in
|
||||
* display pixels.
|
||||
* @param minor The length of the minor axis of an ellipse that describes the
|
||||
* touch area, in display pixels.
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* Notifies about a finger leaving the sensor area.
|
||||
*/
|
||||
oneway onFingerUp();
|
||||
};
|
||||
30
biometrics/fingerprint/2.3/vts/functional/Android.bp
Normal file
30
biometrics/fingerprint/2.3/vts/functional/Android.bp
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
cc_test {
|
||||
name: "VtsHalBiometricsFingerprintV2_3TargetTest",
|
||||
defaults: ["VtsHalTargetTestDefaults"],
|
||||
srcs: ["VtsHalBiometricsFingerprintV2_3TargetTest.cpp"],
|
||||
static_libs: [
|
||||
"android.hardware.biometrics.fingerprint@2.1",
|
||||
"android.hardware.biometrics.fingerprint@2.2",
|
||||
"android.hardware.biometrics.fingerprint@2.3",
|
||||
],
|
||||
test_suites: [
|
||||
"general-tests",
|
||||
"vts",
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android/hardware/biometrics/fingerprint/2.3/IBiometricsFingerprint.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <hidl/GtestPrinter.h>
|
||||
#include <hidl/HidlSupport.h>
|
||||
#include <hidl/ServiceManagement.h>
|
||||
|
||||
namespace {
|
||||
|
||||
namespace hidl_interface_2_3 = android::hardware::biometrics::fingerprint::V2_3;
|
||||
|
||||
using hidl_interface_2_3::IBiometricsFingerprint;
|
||||
|
||||
using android::sp;
|
||||
|
||||
// Callback arguments that need to be captured for the tests.
|
||||
struct FingerprintCallbackArgs {};
|
||||
|
||||
class FingerprintHidlTest : public ::testing::TestWithParam<std::string> {
|
||||
public:
|
||||
void SetUp() override {
|
||||
mService = IBiometricsFingerprint::getService(GetParam());
|
||||
ASSERT_NE(mService, nullptr);
|
||||
}
|
||||
|
||||
sp<IBiometricsFingerprint> mService;
|
||||
};
|
||||
|
||||
// This is a one-way method that doesn't return anything.
|
||||
TEST_P(FingerprintHidlTest, onFingerDownTest) {
|
||||
mService->onFingerDown(1, 2, 3.0f, 4.0f);
|
||||
}
|
||||
|
||||
// This is a one-way method that doesn't return anything.
|
||||
TEST_P(FingerprintHidlTest, onFingerUp) {
|
||||
mService->onFingerUp();
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(PerInstance, FingerprintHidlTest,
|
||||
testing::ValuesIn(android::hardware::getAllHalInstanceNames(
|
||||
IBiometricsFingerprint::descriptor)),
|
||||
android::hardware::PrintInstanceNameToString);
|
||||
Reference in New Issue
Block a user