diff options
author | George Mount <mount@google.com> | 2015-06-04 17:32:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-04 17:32:53 +0000 |
commit | e50b091df9586c5c41d219ffb0c41fa3f893c329 (patch) | |
tree | 494b1b7e6a9cc9a368c4b18be15490cf51cbb345 | |
parent | a1b35394b69145fe0a08eebb9d71ff8d54a4fca9 (diff) | |
parent | ec3364cc3257372f10e8bad66832874a3bf45d7d (diff) | |
download | frameworks_base-e50b091df9586c5c41d219ffb0c41fa3f893c329.zip frameworks_base-e50b091df9586c5c41d219ffb0c41fa3f893c329.tar.gz frameworks_base-e50b091df9586c5c41d219ffb0c41fa3f893c329.tar.bz2 |
Merge "Clean up the enter transition even if there is not entering fragment." into mnc-dev
-rw-r--r-- | core/java/android/app/BackStackRecord.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java index 1fb88a9..02e26a5 100644 --- a/core/java/android/app/BackStackRecord.java +++ b/core/java/android/app/BackStackRecord.java @@ -1107,6 +1107,7 @@ final class BackStackRecord extends FragmentTransaction implements } if (enterTransition != null) { + enterTransition.removeTarget(state.nonExistentView); View view = inFragment.getView(); if (view != null) { view.captureTransitioningViews(enteringViews); @@ -1115,7 +1116,6 @@ final class BackStackRecord extends FragmentTransaction implements } enteringViews.add(state.nonExistentView); // We added this earlier to prevent any views being targeted. - enterTransition.removeTarget(state.nonExistentView); addTargets(enterTransition, enteringViews); } setSharedElementEpicenter(enterTransition, state); @@ -1170,7 +1170,7 @@ final class BackStackRecord extends FragmentTransaction implements Transition exitTransition, Transition sharedElementTransition, Fragment inFragment, boolean isBack) { boolean overlap = true; - if (enterTransition != null && exitTransition != null) { + if (enterTransition != null && exitTransition != null && inFragment != null) { overlap = isBack ? inFragment.getAllowReturnTransitionOverlap() : inFragment.getAllowEnterTransitionOverlap(); } @@ -1638,7 +1638,7 @@ final class BackStackRecord extends FragmentTransaction implements private void setBackNameOverrides(TransitionState state, ArrayMap<String, View> namedViews, boolean isEnd) { - int count = mSharedElementTargetNames.size(); + int count = mSharedElementTargetNames == null ? 0 : mSharedElementTargetNames.size(); for (int i = 0; i < count; i++) { String source = mSharedElementSourceNames.get(i); String originalTarget = mSharedElementTargetNames.get(i); @@ -1656,7 +1656,7 @@ final class BackStackRecord extends FragmentTransaction implements private void setNameOverrides(TransitionState state, ArrayMap<String, View> namedViews, boolean isEnd) { - int count = namedViews.size(); + int count = namedViews == null ? 0 : namedViews.size(); for (int i = 0; i < count; i++) { String source = namedViews.keyAt(i); String target = namedViews.valueAt(i).getTransitionName(); |