Doze和AppStandby白名单配置方法和说明

发布于:2024-07-12 ⋅ 阅读:(125) ⋅ 点赞:(0)

机制

配置路径

配置案例

说明

影响机制

调试命令

Doze

/platform/frameworks/base

/data/etc/platform.xml

allow-in-power-save

【系统应用Doze白名单配置】

Doze\Job\AppStandby\Alarm\WakeLock\Sync

查看Doze白名单:adb shell dumpsys deviceidle

添加Doze白名单:adb shell dumpsys deviceidle whitelist +com.test

删除Doze白名单:adb shell dumpsys deviceidle whitelist -com.test

进入Doze模式:

灭屏

adb shell dumpsys battery unplug

adb shell dumpsys deviceidle step

Stepped to deep: IDLE_PENDING

adb shell dumpsys deviceidle step

Stepped to deep: SENSING

adb shell dumpsys deviceidle step

Stepped to deep: LOCATING

adb shell dumpsys deviceidle step

Stepped to deep: IDLE【设备处于Doze】

allow-in-power-save-except-idle

系统应用Doze白名单

省电模式下也能豁免,一般少配置

Doze\Job\AppStandby\Alarm\WakeLock\Sync\省电机制

preload/common/system_ext/etc

/appstandby/appstandby_config.json

doze_pkg_white_list

【第三方应用Doze白名单】可云配推送

实现原理:

DeviceIdleController.addPowerSaveWhitelistApp

Doze\Job\AppStandby\Alarm\WakeLock\Sync

temp_pkg_white_list

Doze tempWhiteList白名单

AppStandby

appstandby_pkg_white_list

AppStandby白名单

实现原理AppStandbyController.setAppStandbyBucket

AppStandby

查看AppStandby白名单:待实现

App进入AppStandby:adb shell dumpsys battery unplug && adb shell am set-inactive com.google.android.gms true

App退出AppStandby:adb shell am set-inactive com.google.android.gms false && adb shell am get-inactive com.google.android.gms

Doze 白名单

AppStandby 白名单


网站公告

今日签到

点亮在社区的每一天
去签到