DO NOT MERGE ANYWHERE:Fix NPE during Activity transition using wrong Activity.
Bug 30786309 If the Activity used in makeSceneTransitionAnimation isn't the same one used in the startActivity call, a NullPointerException could be thrown. Change-Id: Id21c54fcf99b353feab62f7fc160997ed06e7d23 (cherry picked from commit3289bfa289) (cherry picked from commita3edbf6a5d)
This commit is contained in:
committed by
Adam Seaton
parent
b78a9bc5fe
commit
c9373e5505
@@ -337,11 +337,12 @@ class ActivityTransitionState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void startExitOutTransition(Activity activity, Bundle options) {
|
public void startExitOutTransition(Activity activity, Bundle options) {
|
||||||
if (!activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)) {
|
mEnterTransitionCoordinator = null;
|
||||||
|
if (!activity.getWindow().hasFeature(Window.FEATURE_ACTIVITY_TRANSITIONS) ||
|
||||||
|
mExitTransitionCoordinators == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ActivityOptions activityOptions = new ActivityOptions(options);
|
ActivityOptions activityOptions = new ActivityOptions(options);
|
||||||
mEnterTransitionCoordinator = null;
|
|
||||||
if (activityOptions.getAnimationType() == ActivityOptions.ANIM_SCENE_TRANSITION) {
|
if (activityOptions.getAnimationType() == ActivityOptions.ANIM_SCENE_TRANSITION) {
|
||||||
int key = activityOptions.getExitCoordinatorKey();
|
int key = activityOptions.getExitCoordinatorKey();
|
||||||
int index = mExitTransitionCoordinators.indexOfKey(key);
|
int index = mExitTransitionCoordinators.indexOfKey(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user