当前位置:   article > 正文

Android修改默认屏幕亮度_android11 修改屏幕默认亮度值

android11 修改屏幕默认亮度值

本文基于Android5.1


1、修改默认屏幕亮度:\frameworks\base\packages\SettingsProvider\res\values\defaults.xml

  1. <!-- Default screen brightness, from 0 to 255. 102 is 40%. -->
  2. <integer name="def_screen_brightness">204</integer>

如上def_screen_brightness值,而系统屏幕最大亮度值为255,如果要修改默认为80%;因此255 * 80%=20.4,

2、修改默认屏幕亮度最大值和最小值:\frameworks\base\core\res\res\values\config.xml

  1. <!-- Minimum screen brightness setting allowed by the power manager.
  2. The user is forbidden from setting the brightness below this level. -->
  3. <integer name="config_screenBrightnessSettingMinimum">10</integer>
  4. <!-- Maximum screen brightness allowed by the power manager.
  5. The user is forbidden from setting the brightness above this level. -->
  6. <integer name="config_screenBrightnessSettingMaximum">204</integer>

如上这里指的系统默认亮度最大值为255,最小值为10,在此将可修改

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/657186
推荐阅读
相关标签
  

闽ICP备14008679号