Skip to content

Commit 95a6a96

Browse files
author
Amith Yamasani
committed
Fix an NPE when launching an activity that's not found.
Bug: 6356194 Change-Id: I66aeeda3ecab36a4aa32fb78c1d0559a73cd9a7a
1 parent d7f256d commit 95a6a96

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)