Loading packages/SystemUI/src/com/android/systemui/FaceScanningOverlay.kt +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -352,6 +356,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = true logger.biometricEvent("biometricAuthenticated") enableShowProtection(true) } } Loading @@ -372,6 +377,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = false logger.biometricEvent("biometricFailed") enableShowProtection(false) } } Loading @@ -385,6 +391,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = false logger.biometricEvent("biometricError") enableShowProtection(false) } } Loading packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. Loading Loading @@ -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(); } }; Loading packages/SystemUI/src/com/android/systemui/log/ScreenDecorationsLogger.kt +33 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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) } } Loading
packages/SystemUI/src/com/android/systemui/FaceScanningOverlay.kt +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -352,6 +356,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = true logger.biometricEvent("biometricAuthenticated") enableShowProtection(true) } } Loading @@ -372,6 +377,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = false logger.biometricEvent("biometricFailed") enableShowProtection(false) } } Loading @@ -385,6 +391,7 @@ class FaceScanningOverlay( if (biometricSourceType == BiometricSourceType.FACE) { post { faceAuthSucceeded = false logger.biometricEvent("biometricError") enableShowProtection(false) } } Loading
packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. Loading Loading @@ -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(); } }; Loading
packages/SystemUI/src/com/android/systemui/log/ScreenDecorationsLogger.kt +33 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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) } }