Merge "CEC: Make deviceSelect work for MHL device" into lmp-mr1-dev
This commit is contained in:
@@ -326,8 +326,12 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
ActiveSource activeSource = getActiveSource();
|
ActiveSource activeSource = getActiveSource();
|
||||||
HdmiDeviceInfo info = getCecDeviceInfo(activeSource.logicalAddress);
|
HdmiDeviceInfo info = getCecDeviceInfo(activeSource.logicalAddress);
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
info = new HdmiDeviceInfo(Constants.ADDR_INVALID, path, getActivePortId(),
|
info = mService.getDeviceInfoByPort(getActivePortId());
|
||||||
HdmiDeviceInfo.DEVICE_RESERVED, 0, null);
|
if (info == null) {
|
||||||
|
// No CEC/MHL device is present at the port. Attempt to switch to
|
||||||
|
// the hardware port itself for non-CEC devices that may be connected.
|
||||||
|
info = new HdmiDeviceInfo(path, getActivePortId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mService.invokeInputChangeListener(info);
|
mService.invokeInputChangeListener(info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -672,6 +672,16 @@ public final class HdmiControlService extends SystemService {
|
|||||||
return tv() == null ? null : tv().getCecDeviceInfo(logicalAddress);
|
return tv() == null ? null : tv().getCecDeviceInfo(logicalAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ServiceThreadOnly
|
||||||
|
HdmiDeviceInfo getDeviceInfoByPort(int port) {
|
||||||
|
assertRunOnServiceThread();
|
||||||
|
HdmiMhlLocalDeviceStub info = mMhlController.getLocalDevice(port);
|
||||||
|
if (info != null) {
|
||||||
|
return info.getInfo();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns version of CEC.
|
* Returns version of CEC.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user