Merge "Add sensorId to biometric sensor proto dumpsys"
This commit is contained in:
@@ -36,7 +36,7 @@ interface IBiometricAuthenticator {
|
||||
// Retrieve static sensor properties
|
||||
SensorPropertiesInternal getSensorProperties(String opPackageName);
|
||||
|
||||
// Requests a proto dump of the service. See biometrics.proto
|
||||
// Requests a proto dump of the sensor. See biometrics.proto
|
||||
byte[] dumpSensorServiceStateProto();
|
||||
|
||||
// This method prepares the service to start authenticating, but doesn't start authentication.
|
||||
|
||||
@@ -33,8 +33,8 @@ interface IFaceService {
|
||||
// Creates a test session with the specified sensorId
|
||||
ITestSession createTestSession(int sensorId, String opPackageName);
|
||||
|
||||
// Requests a proto dump of the service to the specified fd
|
||||
byte[] dumpSensorServiceStateProto();
|
||||
// Requests a proto dump of the specified sensor
|
||||
byte[] dumpSensorServiceStateProto(int sensorId);
|
||||
|
||||
// Retrieve static sensor properties for all face sensors
|
||||
List<FaceSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
|
||||
|
||||
@@ -34,8 +34,8 @@ interface IFingerprintService {
|
||||
// Creates a test session with the specified sensorId
|
||||
ITestSession createTestSession(int sensorId, String opPackageName);
|
||||
|
||||
// Requests a proto dump of the service to the specified fd
|
||||
byte[] dumpSensorServiceStateProto();
|
||||
// Requests a proto dump of the specified sensor
|
||||
byte[] dumpSensorServiceStateProto(int sensorId);
|
||||
|
||||
// Retrieve static sensor properties for all fingerprint sensors
|
||||
List<FingerprintSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
|
||||
|
||||
@@ -53,7 +53,7 @@ public final class FaceAuthenticator extends IBiometricAuthenticator.Stub {
|
||||
|
||||
@Override
|
||||
public byte[] dumpSensorServiceStateProto() throws RemoteException {
|
||||
return mFaceService.dumpSensorServiceStateProto();
|
||||
return mFaceService.dumpSensorServiceStateProto(mSensorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -157,14 +157,13 @@ public class FaceService extends SystemService implements BiometricServiceCallba
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] dumpSensorServiceStateProto() {
|
||||
public byte[] dumpSensorServiceStateProto(int sensorId) {
|
||||
Utils.checkPermission(getContext(), USE_BIOMETRIC_INTERNAL);
|
||||
|
||||
final ProtoOutputStream proto = new ProtoOutputStream();
|
||||
for (ServiceProvider provider : mServiceProviders) {
|
||||
for (FaceSensorPropertiesInternal props : provider.getSensorProperties()) {
|
||||
provider.dumpProtoState(props.sensorId, proto);
|
||||
}
|
||||
final ServiceProvider provider = getProviderForSensor(sensorId);
|
||||
if (provider != null) {
|
||||
provider.dumpProtoState(sensorId, proto);
|
||||
}
|
||||
proto.flush();
|
||||
return proto.getBytes();
|
||||
|
||||
@@ -54,7 +54,7 @@ public final class FingerprintAuthenticator extends IBiometricAuthenticator.Stub
|
||||
|
||||
@Override
|
||||
public byte[] dumpSensorServiceStateProto() throws RemoteException {
|
||||
return mFingerprintService.dumpSensorServiceStateProto();
|
||||
return mFingerprintService.dumpSensorServiceStateProto(mSensorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -115,15 +115,13 @@ public class FingerprintService extends SystemService implements BiometricServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] dumpSensorServiceStateProto() {
|
||||
public byte[] dumpSensorServiceStateProto(int sensorId) {
|
||||
Utils.checkPermission(getContext(), USE_BIOMETRIC_INTERNAL);
|
||||
|
||||
final ProtoOutputStream proto = new ProtoOutputStream();
|
||||
for (ServiceProvider provider : mServiceProviders) {
|
||||
for (FingerprintSensorPropertiesInternal props
|
||||
: provider.getSensorProperties()) {
|
||||
provider.dumpProtoState(props.sensorId, proto);
|
||||
}
|
||||
final ServiceProvider provider = getProviderForSensor(sensorId);
|
||||
if (provider != null) {
|
||||
provider.dumpProtoState(sensorId, proto);
|
||||
}
|
||||
proto.flush();
|
||||
return proto.getBytes();
|
||||
@@ -437,6 +435,7 @@ public class FingerprintService extends SystemService implements BiometricServic
|
||||
pw.println("Dumping for sensorId: " + props.sensorId
|
||||
+ ", provider: " + provider.getClass().getSimpleName());
|
||||
provider.dumpInternal(props.sensorId, pw);
|
||||
pw.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user