summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author George Mount <mount@google.com> 2015-05-07 20:22:59 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-05-07 20:23:00 +0000
commitb4035fd886ba11869f9b1fd969e01a91e95df6e8 (patch)
tree18967838d5a0f11d56a6ebb2fa0bf8107f2a6837
parent2d9ef99a4ed49a1e43441b86db51cf8533b02a0e (diff)
parent1b4ae634f6a0b07f2773e980cf52fda78ad48a80 (diff)
Merge "Properly cancel animators when View doesn't exist in starting state." into mnc-dev
-rw-r--r--core/java/android/transition/Transition.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index ebc2aac5242e..1b25505799da 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -1639,6 +1639,7 @@ public abstract class Transition implements Cloneable {
for (int i = 0; i < count; i++) {
TransitionValues values = lookIn.get(i);
if (values == null) {
+ // Null values are always added to the end of the list, so we know to stop now.
return null;
}
if (values.view == view) {
@@ -1742,6 +1743,9 @@ public abstract class Transition implements Cloneable {
View oldView = oldInfo.view;
TransitionValues startValues = getTransitionValues(oldView, true);
TransitionValues endValues = getMatchedTransitionValues(oldView, true);
+ if (startValues == null && endValues == null) {
+ endValues = mEndValues.viewValues.get(oldView);
+ }
boolean cancel = (startValues != null || endValues != null) &&
oldInfo.transition.areValuesChanged(oldValues, endValues);
if (cancel) {