Remove dead code in system server initialization.
System server always forks from Zygote so we no longer need
the system_server executable which was probably broken anyhow.
This makes the initialization sequence slightly more intelligible.
Likewise, we don't need the GrimReaper anymore because init
will automatically take care of restarting the system when the
service manager dies.
Change-Id: I02c88d9392f7c8133d9cde9d0d978da89ed80452
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index acfc096..888064c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1085,11 +1085,9 @@
private static final long EARLIEST_SUPPORTED_TIME = 86400 * 1000;
/**
- * This method is called from Zygote to initialize the system. This will cause the native
- * services (SurfaceFlinger, AudioFlinger, etc..) to be started. After that it will call back
- * up into init2() to start the Android services.
+ * Called to initialize native system services.
*/
- native public static void init1(String[] args);
+ private static native void nativeInit();
public static void main(String[] args) {
if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
@@ -1123,12 +1121,12 @@
Environment.setUserRequired(true);
System.loadLibrary("android_servers");
- init1(args);
- }
- public static final void init2() {
Slog.i(TAG, "Entered the Android system server!");
+ // Initialize native services.
+ nativeInit();
+
// This used to be its own separate thread, but now it is
// just the loop we run on the main thread.
ServerThread thr = new ServerThread();