OSDN Git Service

Guard against NPE when using existing process.
authorJeff Sharkey <jsharkey@android.com>
Thu, 10 Oct 2013 16:52:48 +0000 (09:52 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 10 Oct 2013 16:52:48 +0000 (09:52 -0700)
Bug: 11167561
Change-Id: I51ca7daa71504119fb64bc7bc2b7da4e03b13861

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

index 6c6cc98..aae4cb8 100644 (file)
@@ -7555,7 +7555,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                         // Use existing process if already started
                         ProcessRecord proc = getProcessRecordLocked(
                                 cpi.processName, cpr.appInfo.uid, false);
-                        if (proc != null) {
+                        if (proc != null && proc.thread != null) {
                             if (DEBUG_PROVIDER) {
                                 Slog.d(TAG, "Installing in existing process " + proc);
                             }