Fix null pointer exception

- Make sure to use the correct task to get the stack.
- Don't try to show non-resizable toast when we didn't do
anything.

Bug: 27870378
Change-Id: I69fec6aa792c2f05d905a7c99c05ebdc689ad032
This commit is contained in:
Jorim Jaggi
2016-03-28 12:35:31 -07:00
parent 9971d02c38
commit 14810c7e3e

View File

@@ -947,8 +947,6 @@ class ActivityStarter {
// We didn't do anything... but it was needed (a.k.a., client don't use that
// intent!) And for paranoia, make sure we have correctly resumed the top activity.
resumeTargetStackIfNeeded();
mSupervisor.showNonResizeableDockToastIfNeeded(mStartActivity.task,
preferredLaunchStackId, mTargetStack.mStackId);
return START_TASK_TO_FRONT;
}
}
@@ -989,7 +987,7 @@ class ActivityStarter {
top.deliverNewIntentLocked(
mCallingUid, mStartActivity.intent, mStartActivity.launchedFromPackage);
mSupervisor.showNonResizeableDockToastIfNeeded(mStartActivity.task,
preferredLaunchStackId, mTargetStack.mStackId);
preferredLaunchStackId, topStack.mStackId);
return START_DELIVERED_TO_TOP;
}