Correctly support timeout in InputMethodVisibilityVerifier

This is a follow up CL to my previous CL [1], which aimed to implement
an infrastructure of keyboard visibility check in IME CTS tests.

There was a typo in InputMethodVisibilityVerifier#waitUntil(), which
effectively made the timeout concept meaningless.  Fortunately it was
still guaranteed to test the indicator at least twice every time that
method gets called, hence there should be no problem as long as tests
are already passing.  However, on slower devices there was a chance of
false negatives in InputMethodVisibilityVerifie, which should be fixed
with this CL.

 [1]: If999aa51fd2e5fd20e9e2d72a7e1dbeb75e3456d
      d7cb355421143641af4cdda38574337cfae3d24c

Bug: 153580136
Test: atest CtsInputMethodTestCases
Change-Id: I1dc9a707297a89d57d3dd37041cd5823b4bd56df
1 file changed