move clearAnimation to UI thread
bug 5963761

Change-Id: I829cf18a8e6b2538179bf07353929b9bae2aca2d
diff --git a/tests/tests/view/src/android/view/cts/View_AnimationTest.java b/tests/tests/view/src/android/view/cts/View_AnimationTest.java
index 144e670..d06bf31 100644
--- a/tests/tests/view/src/android/view/cts/View_AnimationTest.java
+++ b/tests/tests/view/src/android/view/cts/View_AnimationTest.java
@@ -161,8 +161,11 @@
                 return mAnimation.hasStarted();
             }
         }.run();
-
-        view.clearAnimation();
+        runTestOnUiThread(new Runnable() {
+            public void run() {
+                view.clearAnimation();
+            }
+        });
         Thread.sleep(TIME_OUT);
         assertTrue(mAnimation.hasStarted());
         assertTrue(mAnimation.hasEnded());