Add a port id validation before handling the manual port select.
Test: manual Change-Id: I3313a5fd4c09888d5f00e6feaa0e039bd84e6586 (cherry picked from commit de489cfe3ecb92e3889e88ec62e5cabfdf9d4d22)
This commit is contained in:
@@ -970,7 +970,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