13/n: Remove the use of DaemonWrapper
The DaemonWrapper forces that all clients implement the same interface. This makes it very hard to implement HIDL-specific functionality without affecting unrelated implementations (e.g. groupId exists only for fingerprint, enrollment surface is only used for face). This change does the following high level things: 1) ClientMonitor now has abstract methods to startHalOperation() and stopHalOperation() 2) DaemonWrapper is removed. As a result, ClientMonitor invokes the above abstract methods when a HAL operation must be performed 3) Similarly, introduces Fingerprint*Clients and Face*Clients that are constructed with instances of fingerprint and face HAL. A follow-up CL will remove the remainder of coupling in the ClientMonitor base class (such as groupId, surface, etc). Similarly, a follow-up CL will move the HAL operation scheduling to a common shared area. This can be done once all HAL operations are encapsulated in a ClientMonitor subclass. We can then ensure that all operations are performed/scheduled properly. For example, internal cleanup is not scheduled properly right now. The scheduler will be agnostic to implementation details and should be designed to work based on on a small set of properties that can describe all HIDL operations (such as cancellable/non-cancellable, and synchronous/asynchronous) Also fixed some misnaming (groupId is actually userId in many places). Unrelated to the misnaming issue, GroupId is being removed in a later CL since it's never used, and actually is the same as userId. (See FingerprintService.FingerprintServiceWrapper#enroll). Bug: 157790417 Test: On fingerprint / face devices do the following tests: 1) Modify fingerprint/face utils to have extra/missing templates, reboot device, see dangling/extra templates removed 2) Enroll, auth, rename, remove for multiple users (work profile). Auth includes keyguard, BiometricPromptDemo Change-Id: I3d3565b0cbf77155916a6116e92aced6a8ccc05d
Loading
Please register or sign in to comment