Check for non-interactive dreams when wake and unlocking.

BiometricUnlockController coordinates with KeyguardViewMediator for
ordering the wake and unlock actions, necessary for non-doze/aod dreams.
Currently, the StatusBarStateController is consulted for the doze state.
However, this value can be out of sync with the current state. This
change instead checks the dream interactivity through PowerManager,
which provides a consistent signal for this state. This change also
ensures BiometricUnlockController and KeyguardViewMediator are in sync
on this state with biometricUnlockController informing
KeyguardViewMediator of the dream state in onWakingAndUnlocking, rather
than KeyguardViewMediator calculating this later in handleHide(). This
prevents inconsistencies from state changes between these two method
invocations.

This changelist also improves the logging around wake and unlock in
KeyguardViewMediator.

Test: atest KeyguardViewMediatorTest#testWakeAndUnlockingOverNonInteractiveDream_noWakeByKeyguardViewMediator
Fixes: 293159518
Fixes: 293464892
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:51de9458ec0fab7dc8947fdf50a6b0a30a927a39)
Merged-In: Iaffbb53b29578c0575a7737c8aacdc8ca547b426
Change-Id: Iaffbb53b29578c0575a7737c8aacdc8ca547b426
4 files changed