[lineage-18.0] Introduce in-screen fingerprint scanner HAL.

Change-Id: I3998f73b0b6c29eb437dc62462d9ad9eea1f93d8
This commit is contained in:
Peter Cai 2019-06-21 14:12:04 +08:00 committed by Alexander Koskovich
parent ced36459d9
commit af72b69faf
4 changed files with 84 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The LineageOS Project
<!-- Copyright (C) 2020 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -15,5 +15,5 @@
-->
<permissions>
<feature name="vendor.pa.biometrics.fingerprint.inscreen" />
<feature name="vendor.aospa.biometrics.fingerprint.inscreen" />
</permissions>

View File

@ -0,0 +1,14 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.aospa.biometrics.fingerprint.inscreen@1.0",
root: "vendor.aospa",
system_ext_specific: true,
srcs: [
"IFingerprintInscreen.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: true,
}

View File

@ -0,0 +1,60 @@
/*
* Copyright (C) 2019 The LineageOS 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 vendor.aospa.biometrics.fingerprint.inscreen@1.0;
interface IFingerprintInscreen {
/**
* Called when fingerprint enrollment started
*/
onStartEnroll();
/**
* Called when fingerprint enrollment finished
*/
onFinishEnroll();
/**
* Called when the on-screen area of the fingerprint scanner
* is pressed and ready to scan.
*/
onPress();
/**
* Called when the on-screen area of the scanner is released
*/
onRelease();
/**
* Called when fingerprint scanning is engaged and FOD view is shown
*/
onShowFODView();
/**
* Called when fingerprint scanning is inactivated
*/
onHideFODView();
/**
* Return true if IFingerprintInscreen is responsible for handling
* of given acquiredInfo + vendorCode.
*/
handleAcquired(int32_t acquiredInfo, int32_t vendorCode) generates (bool ret);
/**
* Return true if IFingerprintInscreen is responsible for handling
* of given error + vendorCode.
*/
handleError(int32_t error, int32_t vendorCode) generates (bool ret);
/**
* Enable / disable long-pressing on the fingerprint area.
* Used when in keyguard mode.
*/
setLongPressEnabled(bool enabled);
};

8
interfaces/update-makefiles.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
do_makefiles_update \
"vendor.aospa:vendor/pa/interfaces" \
"android.hardware:hardware/interfaces" \
"android.hidl:system/libhidl/transport"