Add service to monitor/control the flow of data.

bug:2576057
Change-Id: Ib343c7ee1d619c6978910d9ee597db195d5aa3b6
This commit is contained in:
Robert Greenwalt
2010-04-01 14:45:18 -07:00
parent ecb0e63787
commit 9e696c29f0
12 changed files with 1032 additions and 2 deletions

View File

@@ -99,6 +99,7 @@ class ServerThread extends Thread {
DockObserver dock = null;
UiModeManagerService uiMode = null;
RecognitionManagerService recognition = null;
ThrottleService throttle = null;
// Critical services...
try {
@@ -268,6 +269,15 @@ class ServerThread extends Thread {
Slog.e(TAG, "Failure starting Connectivity Service", e);
}
try {
Slog.i(TAG, "Throttle Service");
throttle = new ThrottleService(context);
ServiceManager.addService(
Context.THROTTLE_SERVICE, throttle);
} catch (Throwable e) {
Slog.e(TAG, "Failure starting ThrottleService", e);
}
try {
Slog.i(TAG, "Accessibility Manager");
ServiceManager.addService(Context.ACCESSIBILITY_SERVICE,
@@ -457,6 +467,7 @@ class ServerThread extends Thread {
final BatteryService batteryF = battery;
final ConnectivityService connectivityF = connectivity;
final DockObserver dockF = dock;
final ThrottleService throttleF = throttle;
final UiModeManagerService uiModeF = uiMode;
final AppWidgetService appWidgetF = appWidget;
final WallpaperManagerService wallpaperF = wallpaper;
@@ -488,6 +499,7 @@ class ServerThread extends Thread {
if (wallpaperF != null) wallpaperF.systemReady();
if (immF != null) immF.systemReady();
if (locationF != null) locationF.systemReady();
if (throttleF != null) throttleF.systemReady();
}
});