Merge "Handle non-started LayoutTransition animations correctly" into jb-dev
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index e7b0e78..044627c 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -997,13 +997,13 @@
                 mTransition.showChild(this, child, oldVisibility);
             } else {
                 mTransition.hideChild(this, child, newVisibility);
-                // Only track this on disappearing views - appearing views are already visible
-                // and don't need special handling during drawChild()
-                if (mVisibilityChangingChildren == null) {
-                    mVisibilityChangingChildren = new ArrayList<View>();
-                }
-                mVisibilityChangingChildren.add(child);
                 if (mTransitioningViews != null && mTransitioningViews.contains(child)) {
+                    // Only track this on disappearing views - appearing views are already visible
+                    // and don't need special handling during drawChild()
+                    if (mVisibilityChangingChildren == null) {
+                        mVisibilityChangingChildren = new ArrayList<View>();
+                    }
+                    mVisibilityChangingChildren.add(child);
                     addDisappearingView(child);
                 }
             }