Use the SystemService lifecycle mechanism for AudioService
This will be needed to refactor user restriction handling. Change-Id: I4b77a020d631714e7f94bce5559190e3b78ec72c
This commit is contained in:
@@ -438,7 +438,6 @@ public final class SystemServer {
|
||||
InputManagerService inputManager = null;
|
||||
TelephonyRegistry telephonyRegistry = null;
|
||||
ConsumerIrService consumerIr = null;
|
||||
AudioService audioService = null;
|
||||
MmsServiceBroker mmsService = null;
|
||||
EntropyMixer entropyMixer = null;
|
||||
|
||||
@@ -857,12 +856,7 @@ public final class SystemServer {
|
||||
}
|
||||
|
||||
traceBeginAndSlog("StartAudioService");
|
||||
try {
|
||||
audioService = new AudioService(context);
|
||||
ServiceManager.addService(Context.AUDIO_SERVICE, audioService);
|
||||
} catch (Throwable e) {
|
||||
reportWtf("starting Audio Service", e);
|
||||
}
|
||||
mSystemServiceManager.startService(AudioService.Lifecycle.class);
|
||||
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
|
||||
|
||||
if (!disableNonCoreServices) {
|
||||
@@ -1163,7 +1157,6 @@ public final class SystemServer {
|
||||
final InputManagerService inputManagerF = inputManager;
|
||||
final TelephonyRegistry telephonyRegistryF = telephonyRegistry;
|
||||
final MediaRouterService mediaRouterF = mediaRouter;
|
||||
final AudioService audioServiceF = audioService;
|
||||
final MmsServiceBroker mmsServiceF = mmsService;
|
||||
|
||||
// We now tell the activity manager it is okay to run third party
|
||||
@@ -1234,13 +1227,7 @@ public final class SystemServer {
|
||||
reportWtf("making Connectivity Service ready", e);
|
||||
}
|
||||
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
|
||||
Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "MakeAudioServiceReady");
|
||||
try {
|
||||
if (audioServiceF != null) audioServiceF.systemReady();
|
||||
} catch (Throwable e) {
|
||||
reportWtf("Notifying AudioService running", e);
|
||||
}
|
||||
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
|
||||
|
||||
Watchdog.getInstance().start();
|
||||
|
||||
// It is now okay to let the various system services start their
|
||||
|
||||
Reference in New Issue
Block a user