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

Commit 9f7136e9 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am 59b7a4ec: Merge "Fix for transition layout suppression" into klp-dev

* commit '59b7a4ec':
  Fix for transition layout suppression
parents 218b1163 59b7a4ec
Loading
Loading
Loading
Loading
+35 −25
Original line number Diff line number Diff line
@@ -122,6 +122,10 @@ public abstract class Transition implements Cloneable {
    // Whether this transition is currently paused, due to a call to pause()
    boolean mPaused = false;

    // Whether this transition has ended. Used to avoid pause/resume on transitions
    // that have completed
    private boolean mEnded = false;

    // The set of listeners to be sent transition lifecycle events.
    ArrayList<TransitionListener> mListeners = null;

@@ -914,6 +918,7 @@ public abstract class Transition implements Cloneable {
     * @hide
     */
    public void pause() {
        if (!mEnded) {
            ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
            int numOldAnims = runningAnimators.size();
            for (int i = numOldAnims - 1; i >= 0; i--) {
@@ -930,6 +935,7 @@ public abstract class Transition implements Cloneable {
            }
            mPaused = true;
        }
    }

    /**
     * Resumes this transition, sending out calls to {@link
@@ -940,6 +946,7 @@ public abstract class Transition implements Cloneable {
     */
    public void resume() {
        if (mPaused) {
            if (!mEnded) {
                ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
                int numOldAnims = runningAnimators.size();
                for (int i = numOldAnims - 1; i >= 0; i--) {
@@ -954,6 +961,7 @@ public abstract class Transition implements Cloneable {
                        tmpListeners.get(i).onTransitionResume(this);
                    }
                }
            }
            mPaused = false;
        }
    }
@@ -1071,6 +1079,7 @@ public abstract class Transition implements Cloneable {
                    tmpListeners.get(i).onTransitionStart(this);
                }
            }
            mEnded = false;
        }
        mNumInstances++;
    }
@@ -1111,6 +1120,7 @@ public abstract class Transition implements Cloneable {
                    v.setHasTransientState(false);
                }
            }
            mEnded = true;
        }
    }