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

Commit c881470c authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Additional logging to debug face scanning animation issues" into...

Merge "Merge "Additional logging to debug face scanning animation issues" into udc-dev am: c822edf8 am: 1de837fd am: 70f77f95" into udc-qpr-dev-plus-aosp
parents 4db3a54b dd13b504
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -110,6 +110,10 @@ class FaceScanningOverlay(
        if (showScanningAnimNow == showScanningAnim) {
            return
        }
        logger.cameraProtectionShownOrHidden(keyguardUpdateMonitor.isFaceDetectionRunning,
                authController.isShowing,
                show,
                showScanningAnim)
        showScanningAnim = showScanningAnimNow
        updateProtectionBoundingPath()
        // Delay the relayout until the end of the animation when hiding,
@@ -352,6 +356,7 @@ class FaceScanningOverlay(
            if (biometricSourceType == BiometricSourceType.FACE) {
                post {
                    faceAuthSucceeded = true
                    logger.biometricEvent("biometricAuthenticated")
                    enableShowProtection(true)
                }
            }
@@ -372,6 +377,7 @@ class FaceScanningOverlay(
            if (biometricSourceType == BiometricSourceType.FACE) {
                post {
                    faceAuthSucceeded = false
                    logger.biometricEvent("biometricFailed")
                    enableShowProtection(false)
                }
            }
@@ -385,6 +391,7 @@ class FaceScanningOverlay(
            if (biometricSourceType == BiometricSourceType.FACE) {
                post {
                    faceAuthSucceeded = false
                    logger.biometricEvent("biometricError")
                    enableShowProtection(false)
                }
            }
+4 −2
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.ThreadFactory;
import com.android.systemui.util.settings.SecureSettings;

import kotlin.Pair;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@@ -98,8 +100,6 @@ import java.util.concurrent.Executor;

import javax.inject.Inject;

import kotlin.Pair;

/**
 * An overlay that draws screen decorations in software (e.g for rounded corners or display cutout)
 * for antialiasing and emulation purposes.
@@ -254,11 +254,13 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable {
            new CameraAvailabilityListener.CameraTransitionCallback() {
        @Override
        public void onApplyCameraProtection(@NonNull Path protectionPath, @NonNull Rect bounds) {
            mLogger.cameraProtectionEvent("onApplyCameraProtection");
            showCameraProtection(protectionPath, bounds);
        }

        @Override
        public void onHideCameraProtection() {
            mLogger.cameraProtectionEvent("onHideCameraProtection");
            hideCameraProtection();
        }
    };
+33 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import com.android.systemui.log.dagger.ScreenDecorationsLog
import com.android.systemui.plugins.log.LogBuffer
import com.android.systemui.plugins.log.LogLevel.DEBUG
import com.android.systemui.plugins.log.LogLevel.ERROR
import com.google.errorprone.annotations.CompileTimeConstant
import javax.inject.Inject

private const val TAG = "ScreenDecorationsLog"
@@ -131,4 +132,36 @@ constructor(
    fun onSensorLocationChanged() {
        logBuffer.log(TAG, DEBUG, "AuthControllerCallback in ScreenDecorations triggered")
    }

    fun cameraProtectionShownOrHidden(
        faceDetectionRunning: Boolean,
        biometricPromptShown: Boolean,
        requestedState: Boolean,
        currentlyShowing: Boolean
    ) {
        logBuffer.log(
            TAG,
            DEBUG,
            {
                bool1 = faceDetectionRunning
                bool2 = biometricPromptShown
                bool3 = requestedState
                bool4 = currentlyShowing
            },
            {
                "isFaceDetectionRunning: $bool1, " +
                    "isBiometricPromptShowing: $bool2, " +
                    "requestedState: $bool3, " +
                    "currentState: $bool4"
            }
        )
    }

    fun biometricEvent(@CompileTimeConstant info: String) {
        logBuffer.log(TAG, DEBUG, info)
    }

    fun cameraProtectionEvent(@CompileTimeConstant cameraProtectionEvent: String) {
        logBuffer.log(TAG, DEBUG, cameraProtectionEvent)
    }
}