Merge "Remove all activities that do not successfully launch." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-22 22:05:54 +00:00
committed by Android (Google) Code Review

View File

@@ -957,7 +957,7 @@ class ActivityStarter {
// If we are not able to proceed, disassociate the activity from the task. Leaving an
// activity in an incomplete state can lead to issues, such as performing operations
// without a window container.
if (ActivityManager.isStartResultFatalError(result)
if (!ActivityManager.isStartResultSuccessful(result)
&& mStartActivity.getTask() != null) {
mStartActivity.getTask().removeActivity(mStartActivity);
}