| name | p3-doze-power |
| description | Implement or change Ola P3.2 Doze/power (screen-off idle constants). Use when the user mentions P3.2, Doze, 待机省电, device_idle_constants, power.rs, or PowerEngineCard. |
P3.2 Doze / Power
Decision lives in src/power.rs. Hardware/settings writes go only through src/action.rs (get_global_setting / set_global_setting / delete_global_setting / deviceidle_get). Policy field is doze_enabled on ResourcePolicy and travels APK → DaemonClient.apply → ola apply → resource_step → power::apply_power.
Constraints (do not revert)
- Apply aggressive
device_idle_constants only when the switch is on and screen is off and battery is not charging.
- Screen state comes from
cmd deviceidle get screen. Unknown/empty is treated as screen-on (do not write).
- Charging comes from
SystemMetrics.battery_charging.
- Snapshot the original setting once; restore that value (or
settings delete if it was empty/null) on screen-on, charging, or switch-off.
- Do not
force-idle, do not disable Doze, do not edit the system whitelist.
- Do not zero
sensing_to / locating_to (alarms / location).
- Do not expand PPO
ACTION_DIM.
- Magisk module files live in init mount ns: deploy with
nsenter -t 1 -m. Plain su -c cannot ls/cp /data/adb/modules/olatrix-engine.
- APK debug signature may not match the installed release; uninstall then install (data wipe).
After a stage
Follow session-memory: /home/wlq/wlq/record.sh with WLQ_DIR=/home/wlq/wlq.