Suspend and resume DozeTriggers when entering and exiting car mode.
This change introduces a new DozeMachine state DOZE_SUSPEND_TRIGGERS that is equivalent of DOZE but also suspends any triggers that awaken the device. Entering car mode transitions the state machine to DOZE_SUSPEND_TRIGGERS and leaving the car mode transitions to either DOZE or DOZE_AOD depending on whether Always on Display is enabled. Current behavior when entering car mode: - DozeService is finished. - Always on display is turned off - Tap on screen doesn’t wake up the device - Lifting device doesn’t wake up the device - Sending a notification doesn’t wake up the device. New behavior when entering car mode: - DozeService is not finished. - Remaining behavior is the same as DozeTrigger stops listening to all triggers (sensors, intents, notifications) Current behavior when exiting car mode: - DozeService is not running, normal triggers don't wake up the device New behavior when exiting car mode: - DozeService is running, normal triggers wake up the device as expected. - DozeSuppressor transitions from DOZE_SUSPEND_TRIGGERS to DOZE/DOZE_AOD Bug: 230968777 Fixes: 230968777 Test: manual Test: atest com.android.systemui.doze Change-Id: I5f49bb5700d7ed38763dccc8c5b6438d934c6476
Loading
Please register or sign in to comment