From 427c64140d1c6e031a128323d14b4b30952e1564 Mon Sep 17 00:00:00 2001 From: George Mount Date: Wed, 5 Nov 2014 16:45:36 -0800 Subject: [PATCH] Make setOutlineProvider change transitionGroup. Bug 18203878 Change-Id: Ia343477b8b37566e0fd8fd1a275b56e805bb18dc --- core/java/android/view/ViewGroup.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 654a8edea2fe9..5c433c147a124 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2582,15 +2582,21 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * Returns true if this ViewGroup should be considered as a single entity for removal * when executing an Activity transition. If this is false, child elements will move * individually during the transition. + * * @return True if the ViewGroup should be acted on together during an Activity transition. - * The default value is false when the background is null and true when the background - * is not null or if {@link #getTransitionName()} is not null. + * The default value is true when there is a non-null background or if + * {@link #getTransitionName()} is not null or if a + * non-null {@link android.view.ViewOutlineProvider} other than + * {@link android.view.ViewOutlineProvider#BACKGROUND} was given to + * {@link #setOutlineProvider(ViewOutlineProvider)} and false otherwise. */ public boolean isTransitionGroup() { if ((mGroupFlags & FLAG_IS_TRANSITION_GROUP_SET) != 0) { return ((mGroupFlags & FLAG_IS_TRANSITION_GROUP) != 0); } else { - return getBackground() != null || getTransitionName() != null; + final ViewOutlineProvider outlineProvider = getOutlineProvider(); + return getBackground() != null || getTransitionName() != null || + (outlineProvider != null && outlineProvider != ViewOutlineProvider.BACKGROUND); } }