Merge "Fix transition being canceled improperly." into lmp-mr1-dev
This commit is contained in:
@@ -1790,6 +1790,10 @@ public abstract class Transition implements Cloneable {
|
||||
|
||||
private static boolean isValueChanged(TransitionValues oldValues, TransitionValues newValues,
|
||||
String key) {
|
||||
if (oldValues.values.containsKey(key) != newValues.values.containsKey(key)) {
|
||||
// The transition didn't care about this particular value, so we don't care, either.
|
||||
return false;
|
||||
}
|
||||
Object oldValue = oldValues.values.get(key);
|
||||
Object newValue = newValues.values.get(key);
|
||||
boolean changed;
|
||||
|
||||
@@ -484,12 +484,19 @@ public abstract class Visibility extends Transition {
|
||||
|
||||
@Override
|
||||
boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
|
||||
VisibilityInfo changeInfo = getVisibilityChangeInfo(oldValues, newValues);
|
||||
if (oldValues == null && newValues == null) {
|
||||
return false;
|
||||
}
|
||||
if (oldValues != null && newValues != null &&
|
||||
newValues.values.containsKey(PROPNAME_VISIBILITY) !=
|
||||
oldValues.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);
|
||||
return changeInfo.visibilityChange && (changeInfo.startVisibility == View.VISIBLE ||
|
||||
changeInfo.endVisibility == View.VISIBLE);
|
||||
changeInfo.endVisibility == View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user