mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Make virtual fingerprint HAL as lazy HAL
Bug: 262630839 Test: atest VtsHalBiometricsFingerprintTargetTest Change-Id: I8f17f00d3e91554fcfb99c8b478ed8b6131b4530
This commit is contained in:
@@ -2,8 +2,6 @@ service vendor.fingerprint-example /vendor/bin/hw/android.hardware.biometrics.fi
|
||||
class hal
|
||||
user nobody
|
||||
group nobody
|
||||
interface aidl android.hardware.biometrics.fingerprint.IFingerprint/virtual
|
||||
oneshot
|
||||
disabled
|
||||
on property:ro.vendor.fingerprint_virtual_hal_start=true
|
||||
enable vendor.fingerprint-example
|
||||
on property:persist.vendor.fingerprint.virtual.type=*
|
||||
enable vendor.fingerprint-example
|
||||
|
||||
@@ -28,8 +28,10 @@ int main() {
|
||||
std::shared_ptr<Fingerprint> hal = ndk::SharedRefBase::make<Fingerprint>();
|
||||
|
||||
const std::string instance = std::string(Fingerprint::descriptor) + "/virtual";
|
||||
binder_status_t status = AServiceManager_addService(hal->asBinder().get(), instance.c_str());
|
||||
binder_status_t status =
|
||||
AServiceManager_registerLazyService(hal->asBinder().get(), instance.c_str());
|
||||
CHECK_EQ(status, STATUS_OK);
|
||||
AServiceManager_forceLazyServicesPersist(true);
|
||||
|
||||
ABinderProcess_joinThreadPool();
|
||||
return EXIT_FAILURE; // should not reach
|
||||
|
||||
Reference in New Issue
Block a user