Fix flaky CTS TextView test

TextViewTest.testCutAndPaste_byKey should waitForIdleSync for the test
runnable that is posted to the main thread.

Bug: 30870542
Change-Id: I62624dd6bffdfcb164d517fdd9575359333e5a27
diff --git a/tests/tests/widget/src/android/widget/cts/TextViewTest.java b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
index 9f611ad..19559dd 100644
--- a/tests/tests/widget/src/android/widget/cts/TextViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
@@ -1967,6 +1967,7 @@
                 assertEquals("bca", mTextView.getText().toString());
             }
         });
+        mInstrumentation.waitForIdleSync();
     }
 
     private static boolean hasSpansAtMiddleOfText(final TextView textView, final Class<?> type) {