Fix issue #6111771: Run-time Restart observed when signing in with an existing account

Change-Id: Ic6defb598cb08f2728d99eed7d0b209c88dd1a49
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 429c3c4..e899779 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -8050,8 +8050,10 @@
             }
         };
 
-        if (process == null || process.pid == MY_PID) {
-            worker.run();  // We may be about to die -- need to run this synchronously
+        if (process == null) {
+            // If process is null, we are being called from some internal code
+            // and may be about to die -- run this synchronously.
+            worker.run();
         } else {
             worker.start();
         }