Merge "[ActivityManager] Fix NPE when start activity"

This commit is contained in:
Olawale Ogunwale
2014-12-12 13:49:50 +00:00
committed by Gerrit Code Review

View File

@@ -1315,7 +1315,6 @@ public final class ActivityStackSupervisor implements DisplayListener {
} }
} }
} }
ActivityStack resultStack = resultRecord == null ? null : resultRecord.task.stack;
final int launchFlags = intent.getFlags(); final int launchFlags = intent.getFlags();
@@ -1392,6 +1391,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
} }
} }
final ActivityStack resultStack = resultRecord == null ? null : resultRecord.task.stack;
if (err != ActivityManager.START_SUCCESS) { if (err != ActivityManager.START_SUCCESS) {
if (resultRecord != null) { if (resultRecord != null) {
resultStack.sendActivityResultLocked(-1, resultStack.sendActivityResultLocked(-1,