CEC: Let MHL device be of type 'source'

MHL devices should be of type source that can stream AV contents
to the connected TV. This should be supported by the API
HdmiDeviceInfo.isSourceType().

Bug: 18897172
Change-Id: I7dcbd7773127bf26797c204504a12c3e2ebbd83b
This commit is contained in:
Jinsuk Kim
2015-01-05 16:07:28 +09:00
parent ad1e3d7df4
commit e416d0f67b

View File

@@ -336,9 +336,15 @@ public class HdmiDeviceInfo implements Parcelable {
* Returns {@code true} if the device is of a type that can be an input source.
*/
public boolean isSourceType() {
return mDeviceType == DEVICE_PLAYBACK
|| mDeviceType == DEVICE_RECORDER
|| mDeviceType == DEVICE_TUNER;
if (isCecDevice()) {
return mDeviceType == DEVICE_PLAYBACK
|| mDeviceType == DEVICE_RECORDER
|| mDeviceType == DEVICE_TUNER;
} else if (isMhlDevice()) {
return true;
} else {
return false;
}
}
/**