Invalidate for scrolling animations on the animation timer

Change View methods awakenScrollBars and scrollTo to post their
invalidation on the animation timer. Since these are often used in
computeScroll or similar to continue scrolling or flinging it should
not prevent other posted events from being processed before the frame
is actually drawn. (All changes in scroll position, etc. are
immediately reflected after the calls and do not need a draw to
present correct data about scroll position to apps.)

Don't accumulate floating point error while dragging
ScrollView/HorizontalScrollView.

Change-Id: I05b57d75f89a806488e46a8fb79b85d80f56d45d
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index d62e32f..c168b3e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8698,7 +8698,7 @@
             invalidateParentCaches();
             onScrollChanged(mScrollX, mScrollY, oldX, oldY);
             if (!awakenScrollBars()) {
-                invalidate(true);
+                postInvalidateOnAnimation();
             }
         }
     }
@@ -8852,7 +8852,7 @@
 
             if (invalidate) {
                 // Invalidate to show the scrollbars
-                invalidate(true);
+                postInvalidateOnAnimation();
             }
 
             if (scrollCache.state == ScrollabilityCache.OFF) {