Android16 RK3576修改亮度调节为线性调节

📅 2026/7/22 9:12:09
Android16 RK3576修改亮度调节为线性调节
在大屏项目遇到一个原生设置亮度调节的问题,当在原生设置里面,调节亮度调的时候,发现50%的时候,settings get system screen_brightness获取的实际亮度往往偏的很小,这是因为系统使用了非线性的调节方式,所以为了适配我们的项目需要进行调整。 1.setting里面亮度显示页面在: packages\apps\Settings\src\com\android\settings\display\BrightnessLevelPreferenceController.java我们查看其代码:/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distri