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

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

Merge changes from topic "face-logging" into qt-dev

* changes:
  Populate debug value for biometric atoms
  Adding debug value to Biometric atoms.
parents 1d66b0b0 4858da4a
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -3122,6 +3122,8 @@ message BiometricAcquired {
    optional int32 acquire_info = 6;
    optional int32 acquire_info = 6;
    // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
    // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR.
    optional int32 acquire_info_vendor = 7;
    optional int32 acquire_info_vendor = 7;
    // Dictates if this message should trigger additional debugging.
    optional bool debug = 8;
}
}


/**
/**
@@ -3158,6 +3160,8 @@ message BiometricAuthenticated {
    // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
    // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to
    // CONFIRMED.
    // CONFIRMED.
    optional int64 latency_millis = 7;
    optional int64 latency_millis = 7;
    // Dictates if this message should trigger additional debugging.
    optional bool debug = 8;
}
}


/**
/**
@@ -3183,6 +3187,8 @@ message BiometricErrorOccurred {
    // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
    // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined
    // by the vendor and not specified by the HIDL interface.
    // by the vendor and not specified by the HIDL interface.
    optional int32 error_info_vendor = 7;
    optional int32 error_info_vendor = 7;
    // Dictates if this message should trigger additional debugging.
    optional bool debug = 8;
}
}


/**
/**
@@ -3195,6 +3201,8 @@ message BiometricSystemHealthIssueDetected {
    optional android.hardware.biometrics.ModalityEnum modality = 1;
    optional android.hardware.biometrics.ModalityEnum modality = 1;
    // Type of issue detected.
    // Type of issue detected.
    optional android.hardware.biometrics.IssueEnum issue = 2;
    optional android.hardware.biometrics.IssueEnum issue = 2;
    // Dictates if this message should trigger additional debugging.
    optional bool debug = 3;
}
}


/**
/**
+7 −0
Original line number Original line Diff line number Diff line
@@ -8163,6 +8163,13 @@ public final class Settings {
        private static final Validator FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION_VALIDATOR =
        private static final Validator FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION_VALIDATOR =
                BOOLEAN_VALIDATOR;
                BOOLEAN_VALIDATOR;
        /**
         * Whether or not debugging is enabled.
         * @hide
         */
        public static final String BIOMETRIC_DEBUG_ENABLED =
                "biometric_debug_enabled";
        /**
        /**
         * Whether the assist gesture should be enabled.
         * Whether the assist gesture should be enabled.
         *
         *
+2 −1
Original line number Original line Diff line number Diff line
@@ -708,7 +708,8 @@ public class SettingsBackupTest {
                 Settings.Secure.FLASHLIGHT_ENABLED,
                 Settings.Secure.FLASHLIGHT_ENABLED,
                 Settings.Secure.CROSS_PROFILE_CALENDAR_ENABLED,
                 Settings.Secure.CROSS_PROFILE_CALENDAR_ENABLED,
                 Settings.Secure.LOCATION_ACCESS_CHECK_INTERVAL_MILLIS,
                 Settings.Secure.LOCATION_ACCESS_CHECK_INTERVAL_MILLIS,
                 Settings.Secure.LOCATION_ACCESS_CHECK_DELAY_MILLIS);
                 Settings.Secure.LOCATION_ACCESS_CHECK_DELAY_MILLIS,
                 Settings.Secure.BIOMETRIC_DEBUG_ENABLED);


    @Test
    @Test
    public void systemSettingsBackedUpOrBlacklisted() {
    public void systemSettingsBackedUpOrBlacklisted() {
+2 −2
Original line number Original line Diff line number Diff line
@@ -120,8 +120,8 @@ public abstract class AuthenticationClient extends ClientMonitor {
    @Override
    @Override
    public boolean onAuthenticated(BiometricAuthenticator.Identifier identifier,
    public boolean onAuthenticated(BiometricAuthenticator.Identifier identifier,
            boolean authenticated, ArrayList<Byte> token) {
            boolean authenticated, ArrayList<Byte> token) {
        super.logOnAuthenticated(authenticated, mRequireConfirmation, getTargetUserId(),
        super.logOnAuthenticated(getContext(), authenticated, mRequireConfirmation,
                isBiometricPrompt());
                getTargetUserId(), isBiometricPrompt());


        final BiometricServiceBase.ServiceListener listener = getListener();
        final BiometricServiceBase.ServiceListener listener = getListener();


+4 −2
Original line number Original line Diff line number Diff line
@@ -1054,7 +1054,8 @@ public class BiometricService extends SystemService {
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                    mCurrentAuthSession.mRequireConfirmation,
                    mCurrentAuthSession.mRequireConfirmation,
                    StatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
                    StatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
                    latency);
                    latency,
                    Utils.isDebugEnabled(getContext(), mCurrentAuthSession.mUserId));
        } else {
        } else {
            int error = reason == BiometricPrompt.DISMISSED_REASON_NEGATIVE
            int error = reason == BiometricPrompt.DISMISSED_REASON_NEGATIVE
                    ? BiometricConstants.BIOMETRIC_ERROR_NEGATIVE_BUTTON
                    ? BiometricConstants.BIOMETRIC_ERROR_NEGATIVE_BUTTON
@@ -1077,7 +1078,8 @@ public class BiometricService extends SystemService {
                    BiometricsProtoEnums.ACTION_AUTHENTICATE,
                    BiometricsProtoEnums.ACTION_AUTHENTICATE,
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
                    error,
                    error,
                    0 /* vendorCode */);
                    0 /* vendorCode */,
                    Utils.isDebugEnabled(getContext(), mCurrentAuthSession.mUserId));
        }
        }
    }
    }


Loading