Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e4f6658 authored by Jeff Pu's avatar Jeff Pu Committed by Android (Google) Code Review
Browse files

Merge "Make virtual fingerprint HAL as lazy HAL"

parents 0c54514c ebb2b746
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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
+3 −1
Original line number Diff line number Diff line
@@ -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