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

Commit 360a0d09 authored by pjgowtham's avatar pjgowtham
Browse files

UdfpsHelper: Exclude dim layer from screenshots

The UDFPS dim layer was being captured in screenshots, resulting
in darkened or obscured screenshot content. This occurred because
the dim overlay window was included in the screenshot capture
process.

Use PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY to exclude the dim
layer from screenshots, screen magnification, and mirroring. This
flag is appropriate for system overlays that should not appear in
captured content, similar to how display cutouts and rounded
corners are handled. It also makes the usage of
PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION redundant.

With this change, screenshots will capture the underlying content
without the UDFPS dimming overlay, providing users with clean
screenshots while maintaining proper UDFPS functionality.

Change-Id: I76b1b98e645fffeee580a279a38a87b0c93dab9f
parent 85331b06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class UdfpsHelper(
        flags = Utils.FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS or
                WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
        privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY or
                WindowManager.LayoutParams.PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION
                WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY
        // Avoid announcing window title
        accessibilityTitle = " "
        inputFeatures = WindowManager.LayoutParams.INPUT_FEATURE_SPY