Revert^2 "Move default implementation from 1.1 to 1.0"

94992158c9

Change-Id: I6f52d0e49c3a6c362a7333adfe07a0103943e456
This commit is contained in:
Joshua Mccloskey 2021-02-09 03:46:16 +00:00
parent d1f16b824b
commit 65eddd20ec
6 changed files with 9 additions and 22 deletions

View file

@ -15,10 +15,10 @@
*/
cc_binary {
name: "android.hardware.biometrics.face@1.1-service.example",
name: "android.hardware.biometrics.face@1.0-service.example",
defaults: ["hidl_defaults"],
vendor: true,
init_rc: ["android.hardware.biometrics.face@1.1-service.rc"],
init_rc: ["android.hardware.biometrics.face@1.0-service.rc"],
vintf_fragments: ["manifest_face_default.xml"],
relative_install_path: "hw",
proprietary: true,
@ -31,6 +31,5 @@ cc_binary {
"libutils",
"liblog",
"android.hardware.biometrics.face@1.0",
"android.hardware.biometrics.face@1.1",
],
}

View file

@ -110,12 +110,4 @@ Return<Status> BiometricsFace::resetLockout(const hidl_vec<uint8_t>& /* hat */)
return Status::OK;
}
// Methods from ::android::hardware::biometrics::face::V1_1::IBiometricsFace follow.
Return<Status> BiometricsFace::enrollRemotely(const hidl_vec<uint8_t>& /* hat */,
uint32_t /* timeoutSec */,
const hidl_vec<Feature>& /* disabledFeatures */) {
mClientCallback->onError(kDeviceId, mUserId, FaceError::UNABLE_TO_PROCESS, 0 /* vendorCode */);
return Status::OK;
}
} // namespace android::hardware::biometrics::face::implementation

View file

@ -16,7 +16,7 @@
#pragma once
#include <android/hardware/biometrics/face/1.1/IBiometricsFace.h>
#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <random>
@ -34,7 +34,7 @@ using ::android::hardware::biometrics::face::V1_0::Feature;
using ::android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
using ::android::hardware::biometrics::face::V1_0::Status;
class BiometricsFace : public V1_1::IBiometricsFace {
class BiometricsFace : public V1_0::IBiometricsFace {
public:
BiometricsFace();
@ -71,10 +71,6 @@ class BiometricsFace : public V1_1::IBiometricsFace {
Return<Status> resetLockout(const hidl_vec<uint8_t>& hat) override;
// Methods from ::android::hardware::biometrics::face::V1_1::IBiometricsFace follow.
Return<Status> enrollRemotely(const hidl_vec<uint8_t>& hat, uint32_t timeoutSec,
const hidl_vec<Feature>& disabledFeatures) override;
private:
std::mt19937 mRandom;
int32_t mUserId;

View file

@ -1,4 +1,4 @@
service vendor.face-hal-1-1-default /vendor/bin/hw/android.hardware.biometrics.face@1.1-service.example
service vendor.face-hal-1-0-default /vendor/bin/hw/android.hardware.biometrics.face@1.0-service.example
# "class hal" causes a race condition on some devices due to files created
# in /data. As a workaround, postpone startup until later in boot once
# /data is mounted.

View file

@ -2,7 +2,7 @@
<hal format="hidl">
<name>android.hardware.biometrics.face</name>
<transport>hwbinder</transport>
<version>1.1</version>
<version>1.0</version>
<interface>
<name>IBiometricsFace</name>
<instance>default</instance>

View file

@ -14,10 +14,10 @@
* limitations under the License.
*/
#define LOG_TAG "android.hardware.biometrics.face@1.1-service"
#define LOG_TAG "android.hardware.biometrics.face@1.0-service"
#include <android/hardware/biometrics/face/1.0/types.h>
#include <android/hardware/biometrics/face/1.1/IBiometricsFace.h>
#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
#include <android/log.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
@ -27,7 +27,7 @@ using android::sp;
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::biometrics::face::implementation::BiometricsFace;
using android::hardware::biometrics::face::V1_1::IBiometricsFace;
using android::hardware::biometrics::face::V1_0::IBiometricsFace;
int main() {
ALOGI("BiometricsFace HAL is being started.");