Listen to wakefulness instead of DozeMachine for AOD -> isAwake(*).
DozeMachine does not start (and thus does not finish) if AOD is enabled but we are not controlling the screen off animation. It's also on a different timeline than wakefulness, so it's just not a good idea to rely on it. Now that we have PowerInteractor, let's use that.
This borrows some of keyguard_wm_state_refactor's insecure camera launch logic, since that actually does not require the KeyguardService refactors and makes it possible to determine at wake time whether we need to return to GONE for the insecure camera launch.
Also, fixes a bug where we were ignoring isOccluded for AOD -> isAwake(*) transitions.
Fixes: 331961588
Fixes: 330433884
Flag: ACONFIG com.android.systemui.migrate_clocks_to_blueprint TEAMFOOD
Test: atest SystemUITests
Change-Id: I666af2a8c819c93188e4bd6ced9fa52c6df399b6
3 files changed