summaryrefslogtreecommitdiffstats
path: root/core/java/android/transition
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/transition')
-rw-r--r--core/java/android/transition/TransitionManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java
index ce3cc2f..7bd6287 100644
--- a/core/java/android/transition/TransitionManager.java
+++ b/core/java/android/transition/TransitionManager.java
@@ -182,11 +182,15 @@ public class TransitionManager {
final ViewGroup sceneRoot = scene.getSceneRoot();
- Transition transitionClone = transition.clone();
- transitionClone.setSceneRoot(sceneRoot);
+ Transition transitionClone = null;
+ if (transition != null) {
+ transitionClone = transition.clone();
+ transitionClone.setSceneRoot(sceneRoot);
+ }
Scene oldScene = Scene.getCurrentScene(sceneRoot);
- if (oldScene != null && oldScene.isCreatedFromLayoutResource()) {
+ if (oldScene != null && transitionClone != null &&
+ oldScene.isCreatedFromLayoutResource()) {
transitionClone.setCanRemoveViews(true);
}