Loading packages/SystemUI/res/values/lineage_config.xml +9 −4 Original line number Diff line number Diff line Loading @@ -21,11 +21,16 @@ <!-- Whether to enable framework dimming for UDFPS --> <bool name="config_udfpsFrameworkDimming">false</bool> <!-- Array of brightness-alpha LUT for framework dimming --> <!-- Brightness-to-alpha lookup table (LUT) for UDFPS framework dimming. Each entry is in the format <brightness>,<alpha> where: - brightness = panel backlight level - alpha = dim layer transparency applied at that brightness Rules: • The entries should be strictly ascending by brightness. • First entry = <minBrightness,maxAlpha>. • Last entry = <maxBrightness,minAlpha>. --> <string-array name="config_udfpsDimmingBrightnessAlphaArray" translatable="false"> <item>0,255</item> <item>1,248</item> <item>2,242</item> <item>3,238</item> <item>4,236</item> <item>6,236</item> Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsHelper.kt +3 −2 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ class UdfpsHelper( val (brightness, alpha) = it.split(",").map { value -> value.trim().toInt() } brightness to alpha } val maxPanelBrightness: Int = brightnessAlphaMap.keys.max() private val dimLayoutParams = WindowManager.LayoutParams( WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL, Loading @@ -83,7 +84,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 Loading Loading @@ -148,7 +149,7 @@ class UdfpsHelper( // brightness_alpha_lut array from the kernel. This provides a comparable array. private fun brightnessToAlpha() { val adjustedBrightness = (currentBrightness.coerceIn(minBrightness, maxBrightness) * 4095).toInt() (currentBrightness.coerceIn(minBrightness, maxBrightness) * maxPanelBrightness).toInt() val targetAlpha = brightnessAlphaMap[adjustedBrightness]?.div(255.0f) ?: interpolateAlpha(adjustedBrightness) Loading Loading
packages/SystemUI/res/values/lineage_config.xml +9 −4 Original line number Diff line number Diff line Loading @@ -21,11 +21,16 @@ <!-- Whether to enable framework dimming for UDFPS --> <bool name="config_udfpsFrameworkDimming">false</bool> <!-- Array of brightness-alpha LUT for framework dimming --> <!-- Brightness-to-alpha lookup table (LUT) for UDFPS framework dimming. Each entry is in the format <brightness>,<alpha> where: - brightness = panel backlight level - alpha = dim layer transparency applied at that brightness Rules: • The entries should be strictly ascending by brightness. • First entry = <minBrightness,maxAlpha>. • Last entry = <maxBrightness,minAlpha>. --> <string-array name="config_udfpsDimmingBrightnessAlphaArray" translatable="false"> <item>0,255</item> <item>1,248</item> <item>2,242</item> <item>3,238</item> <item>4,236</item> <item>6,236</item> Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsHelper.kt +3 −2 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ class UdfpsHelper( val (brightness, alpha) = it.split(",").map { value -> value.trim().toInt() } brightness to alpha } val maxPanelBrightness: Int = brightnessAlphaMap.keys.max() private val dimLayoutParams = WindowManager.LayoutParams( WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL, Loading @@ -83,7 +84,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 Loading Loading @@ -148,7 +149,7 @@ class UdfpsHelper( // brightness_alpha_lut array from the kernel. This provides a comparable array. private fun brightnessToAlpha() { val adjustedBrightness = (currentBrightness.coerceIn(minBrightness, maxBrightness) * 4095).toInt() (currentBrightness.coerceIn(minBrightness, maxBrightness) * maxPanelBrightness).toInt() val targetAlpha = brightnessAlphaMap[adjustedBrightness]?.div(255.0f) ?: interpolateAlpha(adjustedBrightness) Loading