diff options
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index f6c1525..36fc5bb 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -32,12 +32,7 @@ import android.content.pm.IPackageManager; import android.database.ContentObserver; import android.database.Cursor; import android.media.AudioService; -import android.os.IBinder; -import android.os.Looper; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.SystemClock; -import android.os.SystemProperties; +import android.os.*; import android.provider.Contacts.People; import android.provider.Settings; import android.server.BluetoothA2dpService; @@ -45,6 +40,7 @@ import android.server.BluetoothDeviceService; import android.server.search.SearchManagerService; import android.util.EventLog; import android.util.Log; +import android.accounts.AccountManagerService; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -117,6 +113,14 @@ class ServerThread extends Thread { mContentResolver = context.getContentResolver(); + try { + Log.i(TAG, "Starting Account Manager."); + ServiceManager.addService(Context.ACCOUNT_SERVICE, + new AccountManagerService(context)); + } catch (Throwable e) { + Log.e(TAG, "Failure starting Account Manager", e); + } + Log.i(TAG, "Starting Content Manager."); ContentService.main(context, factoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL); @@ -169,7 +173,7 @@ class ServerThread extends Thread { bluetooth = new BluetoothDeviceService(context); bluetooth.init(); ServiceManager.addService(Context.BLUETOOTH_SERVICE, bluetooth); - bluetoothA2dp = new BluetoothA2dpService(context); + bluetoothA2dp = new BluetoothA2dpService(context, bluetooth); ServiceManager.addService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE, bluetoothA2dp); @@ -410,19 +414,19 @@ public class SystemServer public static final int FACTORY_TEST_OFF = 0; public static final int FACTORY_TEST_LOW_LEVEL = 1; public static final int FACTORY_TEST_HIGH_LEVEL = 2; - - /** - * This method is called from Zygote to initialize the system. This will cause the native + + /** + * 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. - */ + */ native public static void init1(String[] args); public static void main(String[] args) { // The system server has to run all of the time, so it needs to be // as efficient as possible with its memory usage. VMRuntime.getRuntime().setTargetHeapUtilization(0.8f); - + System.loadLibrary("android_servers"); init1(args); } |