Fix IME Keyguard exit animation

Keyguard exit animation was always applied no matter whether the
current window is shown or not. Because Keyguard exit starts with
alpha=0, this lead to a flicker with the IME window as a frame
later IME was applied its dismissal animation, which reverts it to
alpha=1 at the beginning.

Fix this by only applying exit animation if window is currently
hidden only by policy. Requires readding the old visibility method
*cough cough cough*

Ideally we would apply non-app window policy visibility/animation
at the same place...but today is not the day! (to minimize risk)

Test: Set password, unlock phone
Test: Don't set password, unlock to activity with IME up
Change-Id: I46110c80da4438223282903fd4defeba2c3f0550
Fixes: 36200726
2 files changed