diff options
author | Kenny Root <kroot@google.com> | 2012-07-31 11:17:11 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-07-31 11:17:11 -0700 |
commit | fa74f7e04fcad1258a1b85515547dba0466086d8 (patch) | |
tree | 23c5f583a74ffcc839d9364d281ee1aa637dabed /services | |
parent | bed43546760180f967f0ee0538afbf1f5ef0d649 (diff) | |
parent | bba948dc9e95baab9e6fb728927aada4a00d93de (diff) | |
download | frameworks_base-fa74f7e04fcad1258a1b85515547dba0466086d8.zip frameworks_base-fa74f7e04fcad1258a1b85515547dba0466086d8.tar.gz frameworks_base-fa74f7e04fcad1258a1b85515547dba0466086d8.tar.bz2 |
am bba948dc: Merge "Delay AccountManagerService initialization" into jb-dev
* commit 'bba948dc9e95baab9e6fb728927aada4a00d93de':
Delay AccountManagerService initialization
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index f300d74..e55e7fe 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -114,6 +114,8 @@ class ServerThread extends Thread { : Integer.parseInt(factoryTestStr); final boolean headless = "1".equals(SystemProperties.get("ro.config.headless", "0")); + AccountManagerService accountManager = null; + ContentService contentService = null; LightsService lights = null; PowerManagerService power = null; BatteryService battery = null; @@ -190,14 +192,14 @@ class ServerThread extends Thread { // The AccountManager must come before the ContentService try { Slog.i(TAG, "Account Manager"); - ServiceManager.addService(Context.ACCOUNT_SERVICE, - new AccountManagerService(context)); + accountManager = new AccountManagerService(context); + ServiceManager.addService(Context.ACCOUNT_SERVICE, accountManager); } catch (Throwable e) { Slog.e(TAG, "Failure starting Account Manager", e); } Slog.i(TAG, "Content Manager"); - ContentService.main(context, + contentService = ContentService.main(context, factoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL); Slog.i(TAG, "System Content Providers"); @@ -466,6 +468,20 @@ class ServerThread extends Thread { } try { + if (accountManager != null) + accountManager.systemReady(); + } catch (Throwable e) { + reportWtf("making Account Manager Service ready", e); + } + + try { + if (contentService != null) + contentService.systemReady(); + } catch (Throwable e) { + reportWtf("making Content Service ready", e); + } + + try { Slog.i(TAG, "Notification Manager"); notification = new NotificationManagerService(context, statusBar, lights); ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification); |