Skip to content

Commit 3cdfcdc

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix an NPE when launching an activity that's not found."
2 parents f52b6ed + 95a6a96 commit 3cdfcdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/java/com/android/server/am/ActivityStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,7 @@ final int startActivityMayWait(IApplicationThread caller, int callingUid,
29442944
// Collect information about the target of the Intent.
29452945
ActivityInfo aInfo = resolveActivity(intent, resolvedType, startFlags,
29462946
profileFile, profileFd, userId);
2947-
if (mService.isSingleton(aInfo.processName, aInfo.applicationInfo)) {
2947+
if (aInfo != null && mService.isSingleton(aInfo.processName, aInfo.applicationInfo)) {
29482948
userId = 0;
29492949
}
29502950
aInfo = mService.getActivityInfoForUser(aInfo, userId);

0 commit comments

Comments
 (0)