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

Commit 84f162af authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Clean up ServiceListener / ClientMonitor

1) ClientMonitors should be less "abstract", and should be instantiated
   with knowledge of "sensorId" and "strength"
2) ClientMonitors should not care about who their client is (e.g.
   FingerprintManager, FaceManager, BiometricService). As such,
   added a new shim (ClientMonitorCallbackConverter) that receives
   callbacks from ClientMonitor and forwards it to the client it was
   instantiated with.

Fixes: 157077040
Bug: 157184083

Test: atest com.android.server.biometrics
Test: 1) Enroll, auth on keyguard, auth in BiometricPromptDemo,
         remove via settings
      2) Enumerate/cleanup - modify FingerprintUtils/FaceUtils to either
         store an extra template, or no template in the framework cache
         upon enroll completion. reboot device, notice either "framework
         template" being removed, or "HAL template" being removed

Note: We should move InternalEnumerateClient / InternalRemovalClient
      into their own monitor subclass to remove global state tracking
      in BiometricServiceBase
Note: We can consider breaking down ClientMonitorCallbackConverter into
      an interface or abstract class, to be implemented by receiver
      specific implementations, but it might be a premature optimization
      for now

Change-Id: I4716fdfc3f8156ce0b7d2e8ab1af344200b417d1
parent beb20bb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment