summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2015-05-07 10:18:43 -0700
committerGeorge Mount <mount@google.com>2015-05-07 13:00:12 -0700
commit1b4ae634f6a0b07f2773e980cf52fda78ad48a80 (patch)
tree226c3c79c07dbedcbb7f2d51a6e65d18279002d0 /core
parent9260cb7ffe0845d229a8cfe948b4ba30fe32127b (diff)
downloadframeworks_base-1b4ae634f6a0b07f2773e980cf52fda78ad48a80.zip
frameworks_base-1b4ae634f6a0b07f2773e980cf52fda78ad48a80.tar.gz
frameworks_base-1b4ae634f6a0b07f2773e980cf52fda78ad48a80.tar.bz2
Properly cancel animators when View doesn't exist in starting state.
Bug 19290065 When a transition was interrupted, if a View was not in the start state, but in the end state, then any animator on that View was not canceled. This detects that situation and allows canceling the animator on that View. Change-Id: Ib1d0579bb6b211782c40c6327be59b0c59682731
Diffstat (limited to 'core')
-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 ebc2aac..1b25505 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) {