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

Commit 64c3a438 authored by danielml's avatar danielml Committed by Bruno Martins
Browse files

SystemUI: Only set dim behind UDFPS if it is actually enabled



Setting dim behind the UDFPS layer causes the BiometricPrompt to loose
the dim behind the dialog itself.

Change-Id: Ib806481dc18ef9dfb87801b488975059cb88a377
Signed-off-by: default avatardanielml <daniel@danielml.dev>
parent 8a03333f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ class UdfpsControllerOverlay @JvmOverloads constructor(

    private var overlayTouchListener: TouchExplorationStateChangeListener? = null

    private val frameworkDimming = context.getResources().getBoolean(
        R.bool.config_udfpsFrameworkDimming)
    private val coreLayoutParams = WindowManager.LayoutParams(
        WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
        0 /* flags set in computeLayoutParams() */,
@@ -133,8 +135,10 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
        gravity = android.view.Gravity.TOP or android.view.Gravity.LEFT
        layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
        flags = (Utils.FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS or
                WindowManager.LayoutParams.FLAG_DIM_BEHIND or
                WindowManager.LayoutParams.FLAG_SPLIT_TOUCH)
        if (frameworkDimming) {
            flags = flags or WindowManager.LayoutParams.FLAG_DIM_BEHIND
        }
        privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY
        dimAmount = 0.0f
        // Avoid announcing window title.