Loading packages/SystemUI/src/com/android/systemui/CameraAvailabilityListener.kt +5 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,11 @@ class CameraAvailabilityListener( listeners.remove(callback) } fun debugFaceAuth(id: Int) { val info = cameraProtectionInfoList?.getOrNull(id) if (info != null) notifyCameraActive(info) } private fun isExcluded(packageId: String): Boolean { return excludedPackageIds.contains(packageId) } Loading packages/SystemUI/src/com/android/systemui/FaceScanningOverlay.kt +1 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ class FaceScanningOverlay( override fun enableShowProtection(isCameraActive: Boolean) { val scanningAnimationRequiredWhenCameraActive = keyguardUpdateMonitor.isFaceDetectionRunning || authController.isShowing keyguardUpdateMonitor.isFaceDetectionRunning || authController.isShowing || mDebug val faceAuthSucceeded = keyguardUpdateMonitor.isFaceAuthenticated val showScanningAnimationNow = scanningAnimationRequiredWhenCameraActive && isCameraActive if (showScanningAnimationNow == showScanningAnim) { Loading packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +21 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ public class ScreenDecorations implements @VisibleForTesting protected void showCameraProtection(@NonNull Path protectionPath, @NonNull Rect bounds) { if (mFaceScanningFactory.shouldShowFaceScanningAnim()) { if (mDebug || mFaceScanningFactory.shouldShowFaceScanningAnim()) { DisplayCutoutView overlay = (DisplayCutoutView) getOverlayView( mFaceScanningViewId); if (overlay != null) { Loading Loading @@ -395,6 +395,12 @@ public class ScreenDecorations implements setupDecorations(); }); } if (cmd.getFaceAuthScreen() != null) { mExecutor.execute(() -> { debugTriggerFaceAuth(cmd.getFaceAuthScreen()); }); } }; @Override Loading Loading @@ -630,6 +636,15 @@ public class ScreenDecorations implements } } private void debugTriggerFaceAuth(int screen) { DisplayCutoutView overlay = (DisplayCutoutView) getOverlayView( mFaceScanningViewId); if (overlay != null) { overlay.setDebug(true); mCameraListener.debugFaceAuth(screen); } } private void setupDecorations() { Trace.beginSection("ScreenDecorations#setupDecorations"); setupDecorationsInner(); Loading Loading @@ -1360,6 +1375,7 @@ public class ScreenDecorations implements final List<Rect> mBounds = new ArrayList(); final Rect mBoundingRect = new Rect(); Rect mTotalBounds = new Rect(); boolean mDebug = false; private int mColor = Color.BLACK; private int mRotation; Loading @@ -1378,6 +1394,10 @@ public class ScreenDecorations implements } } public void setDebug(boolean debug) { mDebug = debug; } public void setColor(int color) { if (color == mColor) { return; Loading packages/SystemUI/src/com/android/systemui/decor/ScreenDecorCommand.kt +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ class ScreenDecorCommand( val roundedBottom: RoundedCornerSubCommand? by subCommand(RoundedCornerSubCommand("rounded-bottom")) val faceAuthScreen: Int? by param( longName = "faceAuthScreen", description = "Specify a screen to show face auth animation. 0:outer(default screen), 1:inner", valueParser = Type.Int, ) override fun execute(pw: PrintWriter) { callback.onExecute(this, pw) } Loading @@ -61,6 +69,7 @@ class ScreenDecorCommand( return "ScreenDecorCommand(" + "debug=$debug, " + "color=$color, " + "faceAuthScreen=$faceAuthScreen, " + "roundedTop=$roundedTop, " + "roundedBottom=$roundedBottom)" } Loading Loading
packages/SystemUI/src/com/android/systemui/CameraAvailabilityListener.kt +5 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,11 @@ class CameraAvailabilityListener( listeners.remove(callback) } fun debugFaceAuth(id: Int) { val info = cameraProtectionInfoList?.getOrNull(id) if (info != null) notifyCameraActive(info) } private fun isExcluded(packageId: String): Boolean { return excludedPackageIds.contains(packageId) } Loading
packages/SystemUI/src/com/android/systemui/FaceScanningOverlay.kt +1 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ class FaceScanningOverlay( override fun enableShowProtection(isCameraActive: Boolean) { val scanningAnimationRequiredWhenCameraActive = keyguardUpdateMonitor.isFaceDetectionRunning || authController.isShowing keyguardUpdateMonitor.isFaceDetectionRunning || authController.isShowing || mDebug val faceAuthSucceeded = keyguardUpdateMonitor.isFaceAuthenticated val showScanningAnimationNow = scanningAnimationRequiredWhenCameraActive && isCameraActive if (showScanningAnimationNow == showScanningAnim) { Loading
packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +21 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ public class ScreenDecorations implements @VisibleForTesting protected void showCameraProtection(@NonNull Path protectionPath, @NonNull Rect bounds) { if (mFaceScanningFactory.shouldShowFaceScanningAnim()) { if (mDebug || mFaceScanningFactory.shouldShowFaceScanningAnim()) { DisplayCutoutView overlay = (DisplayCutoutView) getOverlayView( mFaceScanningViewId); if (overlay != null) { Loading Loading @@ -395,6 +395,12 @@ public class ScreenDecorations implements setupDecorations(); }); } if (cmd.getFaceAuthScreen() != null) { mExecutor.execute(() -> { debugTriggerFaceAuth(cmd.getFaceAuthScreen()); }); } }; @Override Loading Loading @@ -630,6 +636,15 @@ public class ScreenDecorations implements } } private void debugTriggerFaceAuth(int screen) { DisplayCutoutView overlay = (DisplayCutoutView) getOverlayView( mFaceScanningViewId); if (overlay != null) { overlay.setDebug(true); mCameraListener.debugFaceAuth(screen); } } private void setupDecorations() { Trace.beginSection("ScreenDecorations#setupDecorations"); setupDecorationsInner(); Loading Loading @@ -1360,6 +1375,7 @@ public class ScreenDecorations implements final List<Rect> mBounds = new ArrayList(); final Rect mBoundingRect = new Rect(); Rect mTotalBounds = new Rect(); boolean mDebug = false; private int mColor = Color.BLACK; private int mRotation; Loading @@ -1378,6 +1394,10 @@ public class ScreenDecorations implements } } public void setDebug(boolean debug) { mDebug = debug; } public void setColor(int color) { if (color == mColor) { return; Loading
packages/SystemUI/src/com/android/systemui/decor/ScreenDecorCommand.kt +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ class ScreenDecorCommand( val roundedBottom: RoundedCornerSubCommand? by subCommand(RoundedCornerSubCommand("rounded-bottom")) val faceAuthScreen: Int? by param( longName = "faceAuthScreen", description = "Specify a screen to show face auth animation. 0:outer(default screen), 1:inner", valueParser = Type.Int, ) override fun execute(pw: PrintWriter) { callback.onExecute(this, pw) } Loading @@ -61,6 +69,7 @@ class ScreenDecorCommand( return "ScreenDecorCommand(" + "debug=$debug, " + "color=$color, " + "faceAuthScreen=$faceAuthScreen, " + "roundedTop=$roundedTop, " + "roundedBottom=$roundedBottom)" } Loading