Skip to content
Commit ed18d808 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add and use ServiceProvider interface on fingerprint2.1

This interface should allow easy support for multiple HAL interfaces.
For example,

for (ServiceProvider p : providers) {
    if (p.containsSensor(sensorId)) {
        p.authenticate(sensorId, ...)
    }
}

or,

ServiceProvider provider = getProviderFor(sensorId)
if (provider != null) provider.authenticate(sensorId, ...)

This should reduce lots of repeated null checks, sensorId checks,
etc. and give FingerprintService a easy way to perform operations
on providers, given a sensorId.

Some of the FingerprintManager code is not sensorId-specific,
but we can update those in the future. Otherwise we have to
touch multiple projects (settings, etc). For now, all client-side
code assumes only a single sensor, so that's what we'll support
from FingerprintService.

Bug: 168843828
Test: No effect on existing devices
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics

Change-Id: Icca5bc1e128afa1bb7b2c05227e87567e564e4cf
parent f15229d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment