Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddbb346e authored by Chet Haase's avatar Chet Haase
Browse files

Handle non-started LayoutTransition animations correctly

A recent change to LayoutTransition noop'd animations in non-visible
parents, to avoid artifacts like scaling/moving from (0,0,0,0). But there
was logic in ViewGroup that didn't account for transitions that didn't actually
run an animation, causing a disconnect between the state of a parent (getting ready
to remove an item later) and the state of the transition (not running, therefore
not needing the child to be removed later).

The fix was to detect when the transition did not start and avoid adding the
view to the list of children to be removed later.

Issue #6602502 Playing video through crackle application only audio is heard no video is displayed

Change-Id: Id5260580ab0d6dd165c62006c7bd579fd821a5f5
parent fe54cb6f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -997,13 +997,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                mTransition.showChild(this, child, oldVisibility);
            } else {
                mTransition.hideChild(this, child, newVisibility);
                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);
                if (mTransitioningViews != null && mTransitioningViews.contains(child)) {
                    addDisappearingView(child);
                }
            }