Always tell Keyguard about occluded state

If there was a window with FLAG_DISMISS_KEYGUARD first, when the
device was unlocked, mWinDismissingKeyguard was set to that window.

Now, a window with FLAG_SHOW_WHEN_LOCKED came on top, so we set the
Keyguard as occluded, but we didn't reset the window that is
dismissing Keyguard.

After that, the old window with FLAG_DISMISS_KEYGUARD was the focused
window again. However, since we didn't reset mWinDismissingKeyguard,
we ended up with DISMISS_KEYGUARD_CONTINUE, and lockscreen was not
occluded anymore. However, we never really told Keyguard about it
because DISMISS_KEYGUARD_CONTINUE was set instead of
DISMISS_KEYGUARD_START.

The first fix of this bug is to always tell Keyguard about the
current occluded state. The second fix is to reset
mWinDismissingKeyguard in case a window SHOW_WHEN_LOCKED comes on top.

Bug: 20102975
Change-Id: I7c778df09a1e393b9eeaf51fd2013012cb40fea9
1 file changed