Invoke callback for HdmiControlService.deviceSelect() for internal source
The call should be always successful if device to switch to is internal TV source as setting it as the active source doesn't require communication with other devices. Added the missing callback invocation. Change-Id: I9968098316a955509f4de0e7af6f4407087ad4a2
This commit is contained in:
@@ -135,7 +135,10 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
void deviceSelect(int targetAddress, IHdmiControlCallback callback) {
|
||||
assertRunOnServiceThread();
|
||||
if (targetAddress == Constants.ADDR_INTERNAL) {
|
||||
handleSelectInternalSource(callback);
|
||||
handleSelectInternalSource();
|
||||
// Switching to internal source is always successful even when CEC control is disabled.
|
||||
setActiveSource(targetAddress);
|
||||
invokeCallback(callback, HdmiControlManager.RESULT_SUCCESS);
|
||||
return;
|
||||
}
|
||||
if (!mService.isControlEnabled()) {
|
||||
@@ -153,7 +156,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
}
|
||||
|
||||
@ServiceThreadOnly
|
||||
private void handleSelectInternalSource(IHdmiControlCallback callback) {
|
||||
private void handleSelectInternalSource() {
|
||||
assertRunOnServiceThread();
|
||||
// Seq #18
|
||||
if (mService.isControlEnabled() && getActiveSource() != mAddress) {
|
||||
|
||||
Reference in New Issue
Block a user