sdm710-common: Import oppo fingerprint hal

Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
This commit is contained in:
SagarMakhar 2019-10-04 16:16:16 +00:00 committed by SamarV-121
parent 46702f925d
commit 1e86d239bc
6 changed files with 246 additions and 0 deletions

4
interfaces/vendor/Android.bp vendored Normal file
View file

@ -0,0 +1,4 @@
hidl_package_root {
name: "vendor.oppo",
path: "device/realme/sdm710-common/interfaces/vendor",
}

View file

@ -0,0 +1,16 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.oppo.hardware.biometrics.fingerprint@2.1",
root: "vendor.oppo",
srcs: [
"IBiometricsFingerprint.hal",
"IBiometricsFingerprintClientCallback.hal",
"types.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: true,
}

View file

@ -0,0 +1,73 @@
/*
* Copyright (C) 2017 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 vendor.oppo.hardware.biometrics.fingerprint@2.1;
import IBiometricsFingerprintClientCallback;
interface IBiometricsFingerprint {
setNotify(IBiometricsFingerprintClientCallback clientCallback) generates (uint64_t deviceId);
preEnroll() generates (uint64_t authChallenge);
enroll(uint8_t[69] hat, uint32_t gid, uint32_t timeoutSec) generates (RequestStatus debugErrno);
postEnroll() generates (RequestStatus debugErrno);
getAuthenticatorId() generates (uint64_t AuthenticatorId);
cancel() generates (RequestStatus debugErrno);
enumerate() generates (RequestStatus debugErrno);
remove(uint32_t gid, uint32_t fid) generates (RequestStatus debugErrno);
setActiveGroup(uint32_t gid, string storePath) generates (RequestStatus debugErrno);
authenticate(uint64_t operationId, uint32_t gid) generates (RequestStatus debugErrno);
pauseEnroll() generates (RequestStatus debugErrno);
pauseIdentify() generates (RequestStatus debugErrno);
continueEnroll() generates (RequestStatus debugErrno);
setScreenState(FingerprintScreenState ScreenState);
getAlikeyStatus() generates (RequestStatus debugErrno);
continueIdentify() generates (RequestStatus debugErrno);
authenticateAsType(uint64_t auth, uint32_t type, FingerprintAuthType AuthType) generates (RequestStatus debugErrno);
getEngineeringInfo(uint32_t info) generates (RequestStatus debugErrno);
sendFingerprintCmd(int32_t cmd, vec<int8_t> CmdId) generates (RequestStatus debugErrno);
dynamicallyConfigLog(uint32_t log) generates (RequestStatus debugErrno);
setTouchEventListener() generates (RequestStatus debugErrno);
getEnrollmentTotalTimes() generates (RequestStatus debugErrno);
cleanUp() generates (RequestStatus debugErrno);
touchUp() generates (RequestStatus debugErrno);
touchDown() generates (RequestStatus debugErrno);
};

View file

@ -0,0 +1,44 @@
/*
* Copyright (C) 2017 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 vendor.oppo.hardware.biometrics.fingerprint@2.1;
/* This HAL interface communicates asynchronous results from the
fingerprint driver in response to user actions on the fingerprint sensor
*/
interface IBiometricsFingerprintClientCallback {
oneway onEnrollResult(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining);
oneway onAcquired(uint64_t deviceId, FingerprintAcquiredInfo acquiredInfo, int32_t vendorCode);
oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec<uint8_t> token);
oneway onError(uint64_t deviceId, FingerprintError error, int32_t vendorCode);
oneway onRemoved(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining);
oneway onEnumerate(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining);
oneway onTouchUp(uint64_t deviceId);
oneway onTouchDown(uint64_t deviceId);
oneway onSyncTemplates(uint64_t deviceId, vec<uint32_t> fingerId, uint32_t remaining);
oneway onFingerprintCmd(int32_t deviceId, vec<uint32_t> groupId, uint32_t remaining);
oneway onImageInfoAcquired(uint32_t type, uint32_t quality, uint32_t match_score);
oneway onMonitorEventTriggered(uint32_t type, string data);
oneway onEngineeringInfoUpdated(uint32_t length, vec<uint32_t> keys, vec<string> values);
};

View file

@ -0,0 +1,103 @@
/*
* Copyright (C) 2017 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 vendor.oppo.hardware.biometrics.fingerprint@2.1;
enum RequestStatus : int32_t {
SYS_UNKNOWN = 1,
SYS_OK = 0,
SYS_ENOENT = -2,
SYS_EINTR = -4,
SYS_EIO = -5,
SYS_EAGAIN = -11,
SYS_ENOMEM = -12,
SYS_EACCES = -13,
SYS_EFAULT = -14,
SYS_EBUSY = -16,
SYS_EINVAL = -22,
SYS_ENOSPC = -28,
SYS_ETIMEDOUT = -110,
};
enum FingerprintError : int32_t {
ERROR_NO_ERROR = 0,
ERROR_HW_UNAVAILABLE = 1,
ERROR_UNABLE_TO_PROCESS = 2,
ERROR_TIMEOUT = 3,
ERROR_NO_SPACE = 4,
ERROR_CANCELED = 5,
ERROR_UNABLE_TO_REMOVE = 6,
ERROR_LOCKOUT = 7,
ERROR_VENDOR = 8
};
enum FingerprintAcquiredInfo : int32_t {
ACQUIRED_GOOD = 0,
ACQUIRED_PARTIAL = 1,
ACQUIRED_INSUFFICIENT = 2,
ACQUIRED_IMAGER_DIRTY = 3,
ACQUIRED_TOO_SLOW = 4,
ACQUIRED_TOO_FAST = 5,
ACQUIRED_VENDOR = 6
};
struct FingerprintFingerId {
uint32_t gid;
uint32_t fid;
};
struct FingerprintEnroll {
FingerprintFingerId finger;
uint32_t samplesRemaining; uint64_t msg;
};
struct FingerprintIterator {
FingerprintFingerId finger;
uint32_t remainingTemplates;
};
typedef FingerprintIterator FingerprintEnumerated;
typedef FingerprintIterator FingerprintRemoved;
struct FingerprintAcquired {
FingerprintAcquiredInfo acquiredInfo;
};
struct FingerprintAuthenticated {
FingerprintFingerId finger;
uint8_t[69] hat;
};
enum FingerprintMsgType : int32_t {
ERROR = -1,
ACQUIRED = 1,
TEMPLATE_ENROLLING = 3,
TEMPLATE_REMOVED = 4,
AUTHENTICATED = 5,
TEMPLATE_ENUMERATING = 6,
};
enum FingerprintScreenState : int32_t {
FINGERPRINT_SCREEN_OFF = 0,
FINGERPRINT_SCREEN_ON = 1,
};
enum FingerprintAuthType : int32_t {
TYPE_KEYGUARD = 1,
TYPE_PAY = 2,
TYPE_OTHER = 3,
};

6
interfaces/vendor/update-makefiles.sh vendored Normal file
View file

@ -0,0 +1,6 @@
#!/bin/bash
source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
do_makefiles_update \
"vendor.oppo:device/realme/sdm710-common/interfaces/vendor"