OSDN Git Service

Don't bring up Launcher until after boot complete
authorChristopher Tate <ctate@google.com>
Tue, 8 Jun 2010 01:35:20 +0000 (18:35 -0700)
committerChristopher Tate <ctate@google.com>
Tue, 8 Jun 2010 01:35:20 +0000 (18:35 -0700)
The preboot upgrade handling was bringing up the acore process with a default
application object, then the normal "start the HOME app" code was bringing up
Launcher2 [hosted in acore] in anticipation of boot completion... but then it
saw that the host process was alive and continued with Launcher2's init.
Launcher2 depends on a custom application object, however, so it crashed
immediately.

This change ensures that the HOME app is not actually initted at that level
until after boot has completed, at which point its proper application class
can be instantiated.

Fixes bug #2732250

Change-Id: I1a15384e2c0d50e14300df0c0db236bd7b1a187c

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

index 8857c5f..0c11940 100644 (file)
@@ -5583,7 +5583,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
 
         // See if the top visible activity is waiting to run in this process...
         HistoryRecord hr = topRunningActivityLocked(null);
-        if (hr != null) {
+        if (hr != null && normalMode) {
             if (hr.app == null && app.info.uid == hr.info.applicationInfo.uid
                     && processName.equals(hr.processName)) {
                 try {