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

Commit aef1ae33 authored by George Mount's avatar George Mount
Browse files

API Council changes.

Bug 21571897

Change-Id: I681096c50a6f4a448e399b482742efc06229fab1
parent 44fdcf26
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24476,10 +24476,10 @@ package android.provider {
  public final class AlarmClock {
    ctor public AlarmClock();
    field public static final java.lang.String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
    field public static final java.lang.String ACTION_SET_ALARM = "android.intent.action.SET_ALARM";
    field public static final java.lang.String ACTION_SET_TIMER = "android.intent.action.SET_TIMER";
    field public static final java.lang.String ACTION_SHOW_ALARMS = "android.intent.action.SHOW_ALARMS";
    field public static final java.lang.String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
    field public static final java.lang.String ACTION_SNOOZE_ALARM = "android.intent.action.SNOOZE_ALARM";
    field public static final java.lang.String ALARM_SEARCH_MODE_ALL = "android.all";
    field public static final java.lang.String ALARM_SEARCH_MODE_LABEL = "android.label";
@@ -33746,7 +33746,6 @@ package android.transition {
    method public android.transition.Transition addTarget(java.lang.String);
    method public android.transition.Transition addTarget(java.lang.Class);
    method public android.transition.Transition addTarget(android.view.View);
    method protected boolean areValuesChanged(android.transition.TransitionValues, android.transition.TransitionValues);
    method public boolean canRemoveViews();
    method public abstract void captureEndValues(android.transition.TransitionValues);
    method public abstract void captureStartValues(android.transition.TransitionValues);
@@ -33773,6 +33772,7 @@ package android.transition {
    method public java.util.List<android.view.View> getTargets();
    method public java.lang.String[] getTransitionProperties();
    method public android.transition.TransitionValues getTransitionValues(android.view.View, boolean);
    method public boolean isTransitionRequired(android.transition.TransitionValues, android.transition.TransitionValues);
    method public android.transition.Transition removeListener(android.transition.Transition.TransitionListener);
    method public android.transition.Transition removeTarget(int);
    method public android.transition.Transition removeTarget(java.lang.String);
+2 −2
Original line number Diff line number Diff line
@@ -26406,10 +26406,10 @@ package android.provider {
  public final class AlarmClock {
    ctor public AlarmClock();
    field public static final java.lang.String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
    field public static final java.lang.String ACTION_SET_ALARM = "android.intent.action.SET_ALARM";
    field public static final java.lang.String ACTION_SET_TIMER = "android.intent.action.SET_TIMER";
    field public static final java.lang.String ACTION_SHOW_ALARMS = "android.intent.action.SHOW_ALARMS";
    field public static final java.lang.String ACTION_DISMISS_ALARM = "android.intent.action.DISMISS_ALARM";
    field public static final java.lang.String ACTION_SNOOZE_ALARM = "android.intent.action.SNOOZE_ALARM";
    field public static final java.lang.String ALARM_SEARCH_MODE_ALL = "android.all";
    field public static final java.lang.String ALARM_SEARCH_MODE_LABEL = "android.label";
@@ -36011,7 +36011,6 @@ package android.transition {
    method public android.transition.Transition addTarget(java.lang.String);
    method public android.transition.Transition addTarget(java.lang.Class);
    method public android.transition.Transition addTarget(android.view.View);
    method protected boolean areValuesChanged(android.transition.TransitionValues, android.transition.TransitionValues);
    method public boolean canRemoveViews();
    method public abstract void captureEndValues(android.transition.TransitionValues);
    method public abstract void captureStartValues(android.transition.TransitionValues);
@@ -36038,6 +36037,7 @@ package android.transition {
    method public java.util.List<android.view.View> getTargets();
    method public java.lang.String[] getTransitionProperties();
    method public android.transition.TransitionValues getTransitionValues(android.view.View, boolean);
    method public boolean isTransitionRequired(android.transition.TransitionValues, android.transition.TransitionValues);
    method public android.transition.Transition removeListener(android.transition.Transition.TransitionListener);
    method public android.transition.Transition removeTarget(int);
    method public android.transition.Transition removeTarget(java.lang.String);
+18 −13
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.transition;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Path;
@@ -700,7 +701,7 @@ public abstract class Transition implements Cloneable {
                continue;
            }
            // Only bother trying to animate with values that differ between start/end
            boolean isChanged = start == null || end == null || areValuesChanged(start, end);
            boolean isChanged = start == null || end == null || isTransitionRequired(start, end);
            if (isChanged) {
                if (DBG) {
                    View view = (end != null) ? end.view : start.view;
@@ -1747,7 +1748,7 @@ public abstract class Transition implements Cloneable {
                        endValues = mEndValues.viewValues.get(oldView);
                    }
                    boolean cancel = (startValues != null || endValues != null) &&
                            oldInfo.transition.areValuesChanged(oldValues, endValues);
                            oldInfo.transition.isTransitionRequired(oldValues, endValues);
                    if (cancel) {
                        if (anim.isRunning() || anim.isStarted()) {
                            if (DBG) {
@@ -1770,32 +1771,36 @@ public abstract class Transition implements Cloneable {
    }

    /**
     * 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
     * Returns whether or not the transition should create an Animator, based on the values
     * captured during {@link #captureStartValues(TransitionValues)} and
     * {@link #captureEndValues(TransitionValues)}. 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.
     * provide logic more specific to the transition implementation.
     *
     * @param oldValues the first set of values, may be {@code null}
     * @param newValues the second set of values, may be {@code null}
     * @param startValues the values from captureStartValues, This may be {@code null} if the
     *                    View did not exist in the start state.
     * @param endValues the values from captureEndValues. This may be {@code null} if the View
     *                  did not exist in the end state.
     */
    protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
    public boolean isTransitionRequired(@Nullable TransitionValues startValues,
            @Nullable TransitionValues endValues) {
        boolean valuesChanged = false;
        // if oldValues null, then transition didn't care to stash values,
        // if startValues null, then transition didn't care to stash values,
        // and won't get canceled
        if (oldValues != null && newValues != null) {
        if (startValues != null && endValues != null) {
            String[] properties = getTransitionProperties();
            if (properties != null) {
                int count = properties.length;
                for (int i = 0; i < count; i++) {
                    if (isValueChanged(oldValues, newValues, properties[i])) {
                    if (isValueChanged(startValues, endValues, properties[i])) {
                        valuesChanged = true;
                        break;
                    }
                }
            } else {
                for (String key : oldValues.values.keySet()) {
                    if (isValueChanged(oldValues, newValues, key)) {
                for (String key : startValues.values.keySet()) {
                    if (isValueChanged(startValues, endValues, key)) {
                        valuesChanged = true;
                        break;
                    }
+5 −5
Original line number Diff line number Diff line
@@ -462,18 +462,18 @@ public abstract class Visibility extends Transition {
    }

    @Override
    protected boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
        if (oldValues == null && newValues == null) {
    public boolean isTransitionRequired(TransitionValues startValues, TransitionValues newValues) {
        if (startValues == null && newValues == null) {
            return false;
        }
        if (oldValues != null && newValues != null &&
        if (startValues != null && newValues != null &&
                newValues.values.containsKey(PROPNAME_VISIBILITY) !=
                        oldValues.values.containsKey(PROPNAME_VISIBILITY)) {
                        startValues.values.containsKey(PROPNAME_VISIBILITY)) {
            // The transition wasn't targeted in either the start or end, so it couldn't
            // have changed.
            return false;
        }
        VisibilityInfo changeInfo = getVisibilityChangeInfo(oldValues, newValues);
        VisibilityInfo changeInfo = getVisibilityChangeInfo(startValues, newValues);
        return changeInfo.visibilityChange && (changeInfo.startVisibility == View.VISIBLE ||
                changeInfo.endVisibility == View.VISIBLE);
    }