Test for hidden keyguard before waiting for it.

Now that non-null window tokens are coming in in additional situations
(ag/372453) we have to look at whether the keyguard is hidden before
deciding to wait for it.

Fixes bug 1187500.

Change-Id: Ie89d5334ab3d0f5b8f2cf8c87fef84a9b6392b72
1 file changed