OSDN Git Service

Fix an NPE when launching an activity that's not found.
authorAmith Yamasani <yamasani@google.com>
Wed, 18 Apr 2012 16:54:43 +0000 (09:54 -0700)
committerAmith Yamasani <yamasani@google.com>
Wed, 18 Apr 2012 16:54:43 +0000 (09:54 -0700)
Bug: 6356194
Change-Id: I66aeeda3ecab36a4aa32fb78c1d0559a73cd9a7a

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

index 2c53186..9085cea 100644 (file)
@@ -2944,7 +2944,7 @@ final class ActivityStack {
         // Collect information about the target of the Intent.
         ActivityInfo aInfo = resolveActivity(intent, resolvedType, startFlags,
                 profileFile, profileFd, userId);
-        if (mService.isSingleton(aInfo.processName, aInfo.applicationInfo)) {
+        if (aInfo != null && mService.isSingleton(aInfo.processName, aInfo.applicationInfo)) {
             userId = 0;
         }
         aInfo = mService.getActivityInfoForUser(aInfo, userId);