Additional logging to debug face scanning animation issues
Bug: 278982276 Test: NA, logging changes Change-Id: I7ad6ce7c861a5f6b84334362667dbe9d4007e25b
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user