diff options
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 65e3534..53da75b 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -53,6 +53,7 @@ import com.android.server.accessibility.AccessibilityManagerService; import com.android.server.accounts.AccountManagerService; import com.android.server.am.ActivityManagerService; import com.android.server.audio.AudioService; +import com.android.server.camera.CameraService; import com.android.server.clipboard.ClipboardService; import com.android.server.content.ContentService; import com.android.server.devicepolicy.DevicePolicyManagerService; @@ -124,6 +125,8 @@ public final class SystemServer { "com.android.server.print.PrintManagerService"; private static final String USB_SERVICE_CLASS = "com.android.server.usb.UsbService$Lifecycle"; + private static final String MIDI_SERVICE_CLASS = + "com.android.server.midi.MidiService$Lifecycle"; private static final String WIFI_SERVICE_CLASS = "com.android.server.wifi.WifiService"; private static final String WIFI_P2P_SERVICE_CLASS = @@ -406,6 +409,7 @@ public final class SystemServer { AudioService audioService = null; MmsServiceBroker mmsService = null; EntropyMixer entropyMixer = null; + CameraService cameraService = null; boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false); boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false); @@ -434,6 +438,9 @@ public final class SystemServer { mContentResolver = context.getContentResolver(); + Slog.i(TAG, "Camera Service"); + mSystemServiceManager.startService(CameraService.class); + // The AccountManager must come before the ContentService try { // TODO: seems like this should be disable-able, but req'd by ContentService @@ -810,6 +817,11 @@ public final class SystemServer { } if (!disableNonCoreServices) { + if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_MIDI)) { + // Start MIDI Manager service + mSystemServiceManager.startService(MIDI_SERVICE_CLASS); + } + if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST) || mPackageManager.hasSystemFeature( PackageManager.FEATURE_USB_ACCESSORY)) { @@ -827,16 +839,6 @@ public final class SystemServer { } } - if (!disableNonCoreServices) { - try { - Slog.i(TAG, "MIDI Service"); - ServiceManager.addService(Context.MIDI_SERVICE, - new MidiService(context)); - } catch (Throwable e) { - reportWtf("starting MIDI Service", e); - } - } - mSystemServiceManager.startService(TwilightService.class); mSystemServiceManager.startService(JobSchedulerService.class); @@ -915,6 +917,11 @@ public final class SystemServer { } } + if (!disableNonCoreServices) { + ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, + new GraphicsStatsService(context)); + } + if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_PRINTING)) { mSystemServiceManager.startService(PRINT_MANAGER_SERVICE_CLASS); } |
