Increase timeout in BaseInputConnectionTest

This test had previously used the default for PollingCheck of 3 seconds.
The activity test activity can sometimes fail to open in that time,
making this test flaky. Increasing the timeout should hopefully reduce
flakiness.

Bug: 63136565
Test: Local passing run of CTS test
Change-Id: I549446234ce23c403fc789c381ca535a01bdb683
(cherry picked from commit 891116a271d7afeccead918108e658047ef65ffc)
diff --git a/tests/inputmethod/src/android/view/inputmethod/cts/BaseInputConnectionTest.java b/tests/inputmethod/src/android/view/inputmethod/cts/BaseInputConnectionTest.java
index 8089739..d5ace2e 100644
--- a/tests/inputmethod/src/android/view/inputmethod/cts/BaseInputConnectionTest.java
+++ b/tests/inputmethod/src/android/view/inputmethod/cts/BaseInputConnectionTest.java
@@ -59,6 +59,9 @@
 @MediumTest
 @RunWith(AndroidJUnit4.class)
 public class BaseInputConnectionTest {
+    /** Extended timeout in case the system is sluggish */
+    private static final long WINDOW_FOCUS_TIMEOUT = 10000;
+
     private Instrumentation mInstrumentation;
     private InputMethodCtsActivity mActivity;
     private Window mWindow;
@@ -73,7 +76,7 @@
     public void setup() {
         mInstrumentation = InstrumentationRegistry.getInstrumentation();
         mActivity = mActivityRule.getActivity();
-        PollingCheck.waitFor(mActivity::hasWindowFocus);
+        PollingCheck.waitFor(WINDOW_FOCUS_TIMEOUT, mActivity::hasWindowFocus);
         mWindow = mActivity.getWindow();
         mView = (EditText) mWindow.findViewById(R.id.entry);
         mConnection = new BaseInputConnection(mView, true);