diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-06-13 19:00:36 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-06-17 18:20:42 -0700 |
commit | 2139276ce8b54aba5faa858ca69ed5f01445c269 (patch) | |
tree | b7016d3863d000b731f2ef9b15b4633157ab7d30 /services/java/com/android/server/SystemServer.java | |
parent | 2c43c339de5aaf4fef58aa9b5ac3af48609263a8 (diff) | |
download | frameworks_base-2139276ce8b54aba5faa858ca69ed5f01445c269.zip frameworks_base-2139276ce8b54aba5faa858ca69ed5f01445c269.tar.gz frameworks_base-2139276ce8b54aba5faa858ca69ed5f01445c269.tar.bz2 |
Refactor BatteryService to new pattern.
Apply SystemService pattern to BatteryService.
Change-Id: I4971b2da8d2aed4d14440fb65863a8b916bab03c
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 4b67155..d294cd2 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -150,7 +150,6 @@ public final class SystemServer { private DisplayManagerService mDisplayManagerService; private PackageManagerService mPackageManagerService; private PackageManager mPackageManager; - private BatteryService mBatteryService; private ContentResolver mContentResolver; private boolean mOnlyCore; @@ -362,11 +361,8 @@ public final class SystemServer { // Manages LEDs and display backlight. mSystemServiceManager.startService(LightsService.class); - // Tracks the battery level. - Slog.i(TAG, "Battery Service"); - mBatteryService = new BatteryService(mSystemContext, - LocalServices.getService(LightsManager.class)); - ServiceManager.addService("battery", mBatteryService); + // Tracks the battery level. Requires LightService. + mSystemServiceManager.startService(BatteryService.class); } /** @@ -998,8 +994,7 @@ public final class SystemServer { try { // TODO: use boot phase - mPowerManagerService.systemReady(mBatteryService, - mActivityManagerService.getAppOpsService()); + mPowerManagerService.systemReady(mActivityManagerService.getAppOpsService()); } catch (Throwable e) { reportWtf("making Power Manager Service ready", e); } @@ -1067,11 +1062,6 @@ public final class SystemServer { reportWtf("making Mount Service ready", e); } try { - mBatteryService.systemReady(); - } catch (Throwable e) { - reportWtf("making Battery Service ready", e); - } - try { if (networkScoreF != null) networkScoreF.systemReady(); } catch (Throwable e) { reportWtf("making Network Score Service ready", e); |