Merge "Add a port id validation before handling the manual port select."
This commit is contained in:
@@ -961,7 +961,10 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
|
||||
@ServiceThreadOnly
|
||||
void doManualPortSwitching(int portId, IHdmiControlCallback callback) {
|
||||
assertRunOnServiceThread();
|
||||
// TODO: validate port ID
|
||||
if (!mService.isValidPortId(portId)) {
|
||||
invokeCallback(callback, HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE);
|
||||
return;
|
||||
}
|
||||
if (portId == getLocalActivePort()) {
|
||||
invokeCallback(callback, HdmiControlManager.RESULT_SUCCESS);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user