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

Commit 09247179 authored by Todd Volkert's avatar Todd Volkert Committed by Android (Google) Code Review
Browse files

Merge "Increase visibility of Transition.areValuesChanged() to protected to...

Merge "Increase visibility of Transition.areValuesChanged() to protected to allow subclasses outside the android.transition package to override it."
parents 2ed8acbb d23391ea
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1762,7 +1762,17 @@ public abstract class Transition implements Cloneable {
        runAnimators();
    }

    boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
    /**
     * Returns whether transition values have changed between the start scene and the end scene
     * (thus determining whether animation is required). The default implementation compares the
     * property values returned from {@link #getTransitionProperties()}, or all property values if
     * {@code getTransitionProperties()} returns null. Subclasses may override this method to
     * provide logic more specific to their transition implementation.
     *
     * @param oldValues the first set of values, may be {@code null}
     * @param newValues the second set of values, may be {@code null}
     */
    protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
        boolean valuesChanged = false;
        // if oldValues null, then transition didn't care to stash values,
        // and won't get canceled
+2 −2
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ public abstract class Visibility extends Transition {
        return visibility == View.VISIBLE && parent != null;
    }

    private VisibilityInfo getVisibilityChangeInfo(TransitionValues startValues,
    private static VisibilityInfo getVisibilityChangeInfo(TransitionValues startValues,
            TransitionValues endValues) {
        final VisibilityInfo visInfo = new VisibilityInfo();
        visInfo.visibilityChange = false;
@@ -484,7 +484,7 @@ public abstract class Visibility extends Transition {
    }

    @Override
    boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
    protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
        if (oldValues == null && newValues == null) {
            return false;
        }