Fix TextViewTest#testIsInputMethodTarget

Wait a bit on isInputMethodTarget like we do in InputMethodManagerTest.

Bug 6392623

Change-Id: I105d27476980466d6af5b099f593184d0d112633
diff --git a/tests/tests/widget/src/android/widget/cts/TextViewTest.java b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
index a5c27c9..aba2293 100755
--- a/tests/tests/widget/src/android/widget/cts/TextViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
@@ -2895,9 +2895,14 @@
             }
         });
         mInstrumentation.waitForIdleSync();
-
         assertTrue(mTextView.isFocused());
-        assertTrue(mTextView.isInputMethodTarget());
+
+        new PollingCheck() {
+            @Override
+            protected boolean check() {
+                return mTextView.isInputMethodTarget();
+            }
+        }.run();
     }
 
     public void testBeginEndBatchEdit() {