diff options
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index e6f92a5..d0e8b5e 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -182,7 +182,7 @@ class ServerThread extends Thread { // only initialize the power service after we have started the // lights service, content providers and the battery service. - power.init(context, lights, ActivityManagerService.getDefault(), battery); + power.init(context, lights, ActivityManagerService.self(), battery); Slog.i(TAG, "Alarm Manager"); alarm = new AlarmManagerService(context); @@ -197,8 +197,7 @@ class ServerThread extends Thread { factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL); ServiceManager.addService(Context.WINDOW_SERVICE, wm); - ((ActivityManagerService)ServiceManager.getService("activity")) - .setWindowManager(wm); + ActivityManagerService.self().setWindowManager(wm); // Skip Bluetooth if we have an emulator kernel // TODO: Use a more reliable check to see if this product should @@ -265,7 +264,7 @@ class ServerThread extends Thread { } catch (Throwable e) { reportWtf("making display ready", e); } - + try { pm.performBootDexOpt(); } catch (Throwable e) { @@ -618,8 +617,7 @@ class ServerThread extends Thread { // where third party code can really run (but before it has actually // started launching the initial applications), for us to complete our // initialization. - ((ActivityManagerService)ActivityManagerNative.getDefault()) - .systemReady(new Runnable() { + ActivityManagerService.self().systemReady(new Runnable() { public void run() { Slog.i(TAG, "Making services ready"); |