Make sure VD animation push staging happens only in MODE_FULL

BUG: 29438210
Change-Id: I6f49fda9447b1ee8827f280aebc8c69925431efc
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 212bf57..61a0bda 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -255,7 +255,6 @@
 
     void runVectorDrawableAnimators(AnimationContext* context) {
         for (auto it = mVectorDrawableAnimators.begin(); it != mVectorDrawableAnimators.end();) {
-            (*it)->pushStaging(*context);
             if ((*it)->animate(*context)) {
                 it = mVectorDrawableAnimators.erase(it);
             } else {
@@ -264,6 +263,12 @@
         }
     }
 
+    void pushStagingVectorDrawableAnimators(AnimationContext* context) {
+        for (auto& anim : mVectorDrawableAnimators) {
+            anim->pushStaging(*context);
+        }
+    }
+
     void destroy() {
         for (auto& renderNode : mPendingAnimatingRenderNodes) {
             renderNode->animators().endAllStagingAnimators();
@@ -328,6 +333,9 @@
         // already ran in each RenderNode. Note that these animators don't damage the RenderNodes.
         // The damaging is done in prepareTree as needed after checking whether a VD has been
         // modified.
+        if (mode == TreeInfo::MODE_FULL) {
+            mRootNode->pushStagingVectorDrawableAnimators(this);
+        }
         mRootNode->runVectorDrawableAnimators(this);
     }