之前有写过一笔记,但后面发现是错误的,感谢之前帮我指出错误的博友!
设置应用的:PowerUsageSummary.java文件,会判断:if (mPowerProfile.getAveragePower(PowerProfile.POWER_SCREEN_FULL) < 10)即亮屏时的功耗。这边主要通过:power_profile.xml 进行配置,默认配置是一个很小的值,如0.1mA,而实际配置正常后,如屏亮度为:300mA,此功能即可正常。更详细的内容,请查看:power_profile.xml 的注释说明。
<!-- Most values are the incremental current used by a feature,
in mA (measured at nominal voltage).
The default values are deliberately incorrect dummy values.
OEM's must measure and provide actual values before
shipping a device.
Example real-world values are given in comments, but they
are totally dependent on the platform and can vary
significantly, so should be measured on the shipping platform
with a power meter. -->
<item name="none">0</item>
<item name="screen.on">0.1</item> <!-- ~200mA -->