Register HdmiControlService

Register the new service that will replace HdmiCecService.
The old one will be removed once the client of the old service
finishes migration to the new service.

Change-Id: I3906292fcf0a7c8286bc89af21a03bd11d3a0e72
This commit is contained in:
Jinsuk Kim
2014-05-29 17:10:39 +09:00
parent 9149c7abb2
commit 7f01f8e76f

View File

@@ -58,7 +58,9 @@ import android.hardware.ISerialManager;
import android.hardware.SerialManager;
import android.hardware.SystemSensorManager;
import android.hardware.hdmi.HdmiCecManager;
import android.hardware.hdmi.HdmiControlManager;
import android.hardware.hdmi.IHdmiCecService;
import android.hardware.hdmi.IHdmiControlService;
import android.hardware.camera2.CameraManager;
import android.hardware.display.DisplayManager;
import android.hardware.input.InputManager;
@@ -386,6 +388,11 @@ class ContextImpl extends Context {
return new HdmiCecManager(IHdmiCecService.Stub.asInterface(b));
}});
registerService(HDMI_CONTROL_SERVICE, new StaticServiceFetcher() {
public Object createStaticService() {
IBinder b = ServiceManager.getService(HDMI_CONTROL_SERVICE);
return new HdmiControlManager(IHdmiControlService.Stub.asInterface(b));
}});
registerService(CLIPBOARD_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {