Repository navigation
功能:新增「移除息屏提醒亮度限制」开关 - #162
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在「息屏提醒」设置中新增开关「移除息屏提醒亮度限制」,开启后息屏提醒(AOD)的亮度跟随系统亮度,强光下也能看清时间和日期。重启系统界面后生效。
背景
AOD 的亮度来自 SystemUI 里写死的亮度表(约 1~97),不会随手机亮度变化,户外强光下很暗。One UI 9.0 上 OneDesign 的同类功能已失效,社区有用户反馈需要替代方案。
实现
com.android.systemui.doze.AODScreenBrightness.updateDozeBrightness(int, int, int)Settings.System.screen_brightness,并限制在brightnessMin ~ brightnessMax之间;不同版本里读不到这两个字段时,用 1~255 兜底AOD.kt、Main.kt、Preference.kt、DetailPaneSystemUI.kt,以及 5 个语言的strings.xml测试
备注