Merge "Avoid NPE around mReusedTask of ActivityStarter" am: f741f88284 am: e79cb5c81d

am: 77fc19fa8e

Change-Id: I477db42ff85d52c07f29b844d7d251ce631251cd
This commit is contained in:
Shigeki Yokomichi
2016-10-24 14:35:29 +00:00
committed by android-build-merger

View File

@@ -1614,9 +1614,9 @@ class ActivityStarter {
== (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK)) { == (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK)) {
// The caller has requested to completely replace any existing task with its new // The caller has requested to completely replace any existing task with its new
// activity. Well that should not be too hard... // activity. Well that should not be too hard...
intentActivity.task.performClearTaskLocked();
intentActivity.task.setIntent(mStartActivity);
mReuseTask = intentActivity.task; mReuseTask = intentActivity.task;
mReuseTask.performClearTaskLocked();
mReuseTask.setIntent(mStartActivity);
// When we clear the task - focus will be adjusted, which will bring another task // When we clear the task - focus will be adjusted, which will bring another task
// to top before we launch the activity we need. This will temporary swap their // to top before we launch the activity we need. This will temporary swap their
// mTaskToReturnTo values and we don't want to overwrite them accidentally. // mTaskToReturnTo values and we don't want to overwrite them accidentally.