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

Commit 10a7843d authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Add sensorId to biometric sensor proto dumpsys"

parents 8405d546 1c0d722a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -36,7 +36,7 @@ interface IBiometricAuthenticator {
    // Retrieve static sensor properties
    // Retrieve static sensor properties
    SensorPropertiesInternal getSensorProperties(String opPackageName);
    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();
    byte[] dumpSensorServiceStateProto();


    // This method prepares the service to start authenticating, but doesn't start authentication.
    // This method prepares the service to start authenticating, but doesn't start authentication.
+2 −2
Original line number Original line Diff line number Diff line
@@ -33,8 +33,8 @@ interface IFaceService {
    // Creates a test session with the specified sensorId
    // Creates a test session with the specified sensorId
    ITestSession createTestSession(int sensorId, String opPackageName);
    ITestSession createTestSession(int sensorId, String opPackageName);


    // Requests a proto dump of the service to the specified fd
    // Requests a proto dump of the specified sensor
    byte[] dumpSensorServiceStateProto();
    byte[] dumpSensorServiceStateProto(int sensorId);


    // Retrieve static sensor properties for all face sensors
    // Retrieve static sensor properties for all face sensors
    List<FaceSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
    List<FaceSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
+2 −2
Original line number Original line Diff line number Diff line
@@ -34,8 +34,8 @@ interface IFingerprintService {
    // Creates a test session with the specified sensorId
    // Creates a test session with the specified sensorId
    ITestSession createTestSession(int sensorId, String opPackageName);
    ITestSession createTestSession(int sensorId, String opPackageName);


    // Requests a proto dump of the service to the specified fd
    // Requests a proto dump of the specified sensor
    byte[] dumpSensorServiceStateProto();
    byte[] dumpSensorServiceStateProto(int sensorId);


    // Retrieve static sensor properties for all fingerprint sensors
    // Retrieve static sensor properties for all fingerprint sensors
    List<FingerprintSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
    List<FingerprintSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);
+1 −1
Original line number Original line Diff line number Diff line
@@ -53,7 +53,7 @@ public final class FaceAuthenticator extends IBiometricAuthenticator.Stub {


    @Override
    @Override
    public byte[] dumpSensorServiceStateProto() throws RemoteException {
    public byte[] dumpSensorServiceStateProto() throws RemoteException {
        return mFaceService.dumpSensorServiceStateProto();
        return mFaceService.dumpSensorServiceStateProto(mSensorId);
    }
    }


    @Override
    @Override
+4 −5
Original line number Original line Diff line number Diff line
@@ -157,14 +157,13 @@ public class FaceService extends SystemService implements BiometricServiceCallba
        }
        }


        @Override
        @Override
        public byte[] dumpSensorServiceStateProto() {
        public byte[] dumpSensorServiceStateProto(int sensorId) {
            Utils.checkPermission(getContext(), USE_BIOMETRIC_INTERNAL);
            Utils.checkPermission(getContext(), USE_BIOMETRIC_INTERNAL);


            final ProtoOutputStream proto = new ProtoOutputStream();
            final ProtoOutputStream proto = new ProtoOutputStream();
            for (ServiceProvider provider : mServiceProviders) {
            final ServiceProvider provider = getProviderForSensor(sensorId);
                for (FaceSensorPropertiesInternal props : provider.getSensorProperties()) {
            if (provider != null) {
                    provider.dumpProtoState(props.sensorId, proto);
                provider.dumpProtoState(sensorId, proto);
                }
            }
            }
            proto.flush();
            proto.flush();
            return proto.getBytes();
            return proto.getBytes();
Loading