Fix issue where AOD would not start

We shouldn't mix wakefulness with dream states, they come asynchronously
from different parts of the system. This means that the device might
not be GOING_TO_SLEEP when DozeService is started.
We also can't rely on wakefulness to drive Doze animations.

Test: unlock with fingerprint
Test: press power from launcher and lock screen multiple times
Fixes: 152835247
Change-Id: I3eaf2ae1801bbb999a6466c214234f33804ccf19
4 files changed