[Bouncer] ensure that bouncer expansion callback..
Will accept setVisibilityChanged#isNotVisible. When dream appears, for whatever
reason, expansion is set to 0 which is BOUNCER_VISIBLE. This propagates
FULLY_SHOWN to callback listeners (for both with feature flag off and
on). In the same code path, bouncer#hide is called. The difference
between the old bouncer and the new bouncer is that visibility was
conflated so because the bouncer was already invisible, we did not
propagate this data to the callback listener that visibility is hidden.
I have separated this callback from when we set visibility with the
actual state flow. Instead,
call setVisibiltyChanged whenever show() or hide() is called for the
interactor.
Fixes: b/259081158
Test: Added a unit test.
Test: Set screen saver and show screen saver when charging. Open screen
saver a bunch of times from unlocked state and locked state to observe
that touches are not lost. I have observed the bug behavior without my change.
Change-Id: I56d535c0422337f09f009960d8e4117ec30ae9c1
5 files changed