diff options
author | George Mount <mount@google.com> | 2014-09-05 12:13:49 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2014-09-05 12:13:49 -0700 |
commit | 21f54f39408d43705e4aa7060c562271ca2886f1 (patch) | |
tree | 2762ce6507006d26def17adf27987cde5397998b /core/java/android/transition | |
parent | 0edfd0be153dffcf4793f319b6aac4865f3cf142 (diff) | |
download | frameworks_base-21f54f39408d43705e4aa7060c562271ca2886f1.zip frameworks_base-21f54f39408d43705e4aa7060c562271ca2886f1.tar.gz frameworks_base-21f54f39408d43705e4aa7060c562271ca2886f1.tar.bz2 |
Only call setHasTransientState in captureHierarchy.
Bug 17390936
Change-Id: I1a8cdc2820b53f6ca9f6edc41a7e87f45bea7811
Diffstat (limited to 'core/java/android/transition')
-rw-r--r-- | core/java/android/transition/Transition.java | 18 | ||||
-rw-r--r-- | core/java/android/transition/TransitionSet.java | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java index 0d1b568..40bb6ec 100644 --- a/core/java/android/transition/Transition.java +++ b/core/java/android/transition/Transition.java @@ -1417,9 +1417,9 @@ public abstract class Transition implements Cloneable { } capturePropagationValues(values); if (start) { - addViewValues(mStartValues, view, values); + addViewValues(mStartValues, view, values, true); } else { - addViewValues(mEndValues, view, values); + addViewValues(mEndValues, view, values, true); } } } @@ -1460,7 +1460,7 @@ public abstract class Transition implements Cloneable { } static void addViewValues(TransitionValuesMaps transitionValuesMaps, - View view, TransitionValues transitionValues) { + View view, TransitionValues transitionValues, boolean setTransientState) { transitionValuesMaps.viewValues.put(view, transitionValues); int id = view.getId(); if (id >= 0) { @@ -1489,11 +1489,15 @@ public abstract class Transition implements Cloneable { // Duplicate item IDs: cannot match by item ID. View alreadyMatched = transitionValuesMaps.itemIdValues.get(itemId); if (alreadyMatched != null) { - alreadyMatched.setHasTransientState(false); + if (setTransientState) { + alreadyMatched.setHasTransientState(false); + } transitionValuesMaps.itemIdValues.put(itemId, null); } } else { - view.setHasTransientState(true); + if (setTransientState) { + view.setHasTransientState(true); + } transitionValuesMaps.itemIdValues.put(itemId, view); } } @@ -1560,9 +1564,9 @@ public abstract class Transition implements Cloneable { } capturePropagationValues(values); if (start) { - addViewValues(mStartValues, view, values); + addViewValues(mStartValues, view, values, true); } else { - addViewValues(mEndValues, view, values); + addViewValues(mEndValues, view, values, true); } } if (view instanceof ViewGroup) { diff --git a/core/java/android/transition/TransitionSet.java b/core/java/android/transition/TransitionSet.java index f6499ae..56db674 100644 --- a/core/java/android/transition/TransitionSet.java +++ b/core/java/android/transition/TransitionSet.java @@ -408,7 +408,7 @@ public class TransitionSet extends Transition { for (int i = 0; i < numValues; i++) { View view = values.viewValues.keyAt(i); if (isValidTarget(view)) { - addViewValues(included, view, values.viewValues.valueAt(i)); + addViewValues(included, view, values.viewValues.valueAt(i), false); } } return included; |