Remove HardwareService and move vibrator support to VibratorService.

The lights support is only needed by PowerManagerService and NotificationManagerService, so we do not need a Binder API for it.
Move backlight and notification light support to new LightsService class.
The camera flash is now handled directly by the camera HAL, so the flash Hardware service flash support is obsolete.

Change-Id: I086d681f54668e7f7de3e8b90df3de19d59833c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-11-24 00:30:52 -05:00
parent f90b1261a5
commit 3a32213c40
18 changed files with 288 additions and 403 deletions

View File

@@ -84,7 +84,7 @@ class ServerThread extends Thread {
int factoryTest = "".equals(factoryTestStr) ? SystemServer.FACTORY_TEST_OFF
: Integer.parseInt(factoryTestStr);
HardwareService hardware = null;
LightsService lights = null;
PowerManagerService power = null;
BatteryService battery = null;
ConnectivityService connectivity = null;
@@ -141,13 +141,15 @@ class ServerThread extends Thread {
battery = new BatteryService(context);
ServiceManager.addService("battery", battery);
Log.i(TAG, "Hardware Service");
hardware = new HardwareService(context);
ServiceManager.addService("hardware", hardware);
Log.i(TAG, "Lights Service");
lights = new LightsService(context);
Log.i(TAG, "Vibrator Service");
ServiceManager.addService("vibrator", new VibratorService(context));
// only initialize the power service after we have started the
// hardware service, content providers and the battery service.
power.init(context, hardware, ActivityManagerService.getDefault(), battery);
// lights service, content providers and the battery service.
power.init(context, lights, ActivityManagerService.getDefault(), battery);
Log.i(TAG, "Alarm Manager");
AlarmManagerService alarm = new AlarmManagerService(context);
@@ -253,7 +255,7 @@ class ServerThread extends Thread {
try {
Log.i(TAG, "Notification Manager");
notification = new NotificationManagerService(context, statusBar, hardware);
notification = new NotificationManagerService(context, statusBar, lights);
ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification);
} catch (Throwable e) {
Log.e(TAG, "Failure starting Notification Manager", e);