Release doze wake lock when doze dream is stopped
Before this CL, if the doze dream instance is replaced by another
dream instance, the doze lock was never released. There is a check
in the DreamManagerService#onDreamStopped path, that normally releases
the doze lock in a normal wake up. But when the doze dream instance
has been replaced by another dream instance, the doze dream token
doesn't match the current dream token, and so the doze wake lock is
never released. This causes the display to flicker right before
entering AOD (dozing).
This CL handles the case when a doze dream is replaced by a normal
dream and releases the doze lock whenever a doze dream instance is
stopped.
Bug: 260094933
Test: manual - check that the flickering disappeared
Change-Id: I3fdf10566ba57fadfa83a5d78038db68bf4a1150
(cherry picked from commit eeaba58c8ad976b3ae71c1afc8717169afdf8441)
2 files changed