summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2014-09-08 14:18:58 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-08 14:18:58 +0000
commitd652526fbef1b39c7e1ad8602fb9f13c4753bca6 (patch)
treec1a09a0f163bea35e5fdf91c1980449e196a7187
parent1cc721208603880c9a12423ad617dc627b17c1be (diff)
parent0f70d97651f1fd373a4f098986fb2f00d7767afe (diff)
downloadframeworks_base-d652526fbef1b39c7e1ad8602fb9f13c4753bca6.zip
frameworks_base-d652526fbef1b39c7e1ad8602fb9f13c4753bca6.tar.gz
frameworks_base-d652526fbef1b39c7e1ad8602fb9f13c4753bca6.tar.bz2
am 27858e18: am c452d4c9: Merge "Improve Visibility parent value check." into lmp-dev
* commit '27858e18146c867e7328ea45f461a4e54ed4b33d': Improve Visibility parent value check.
-rw-r--r--core/java/android/transition/Visibility.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/transition/Visibility.java b/core/java/android/transition/Visibility.java
index 0b02552..d648ca6 100644
--- a/core/java/android/transition/Visibility.java
+++ b/core/java/android/transition/Visibility.java
@@ -358,12 +358,16 @@ public abstract class Visibility extends Transition {
overlayView = startView;
} else if (startView.getParent() instanceof View) {
View startParent = (View) startView.getParent();
- if (!isValidTarget(startParent)) {
- if (startView.isAttachedToWindow()) {
- overlayView = copyViewImage(startView);
- } else {
- overlayView = startView;
- }
+ VisibilityInfo parentVisibilityInfo = null;
+ TransitionValues endParentValues = getMatchedTransitionValues(startParent,
+ true);
+ if (endParentValues != null) {
+ TransitionValues startParentValues = getTransitionValues(startParent, true);
+ parentVisibilityInfo =
+ getVisibilityChangeInfo(startParentValues, endParentValues);
+ }
+ if (parentVisibilityInfo == null || !parentVisibilityInfo.visibilityChange) {
+ overlayView = copyViewImage(startView);
} else if (startParent.getParent() == null) {
int id = startParent.getId();
if (id != View.NO_ID && sceneRoot.findViewById(id) != null