summaryrefslogtreecommitdiffstats
path: root/core/java/android/transition/Visibility.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/transition/Visibility.java')
-rw-r--r--core/java/android/transition/Visibility.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/transition/Visibility.java b/core/java/android/transition/Visibility.java
index f58291f..36bac31 100644
--- a/core/java/android/transition/Visibility.java
+++ b/core/java/android/transition/Visibility.java
@@ -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);
}
/**