Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +16 −4 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.Nullable; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.IHdmiControlCallback; import android.hardware.input.InputManager; import android.hardware.tv.cec.V1_0.SendMessageResult; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -426,15 +427,26 @@ abstract class HdmiCecLocalDevice { assertRunOnServiceThread(); // Note that since this method is called after logical address allocation is done, // mDeviceInfo should not be null. buildAndSendSetOsdName(message.getSource()); return true; } protected void buildAndSendSetOsdName(int dest) { HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildSetOsdNameCommand( mAddress, message.getSource(), mDeviceInfo.getDisplayName()); mAddress, dest, mDeviceInfo.getDisplayName()); if (cecMessage != null) { mService.sendCecCommand(cecMessage); mService.sendCecCommand(cecMessage, new SendMessageCallback() { @Override public void onSendCompleted(int error) { if (error != SendMessageResult.SUCCESS) { HdmiLogger.debug("Failed to send cec command " + cecMessage); } } }); } else { Slog.w(TAG, "Failed to build <Get Osd Name>:" + mDeviceInfo.getDisplayName()); } return true; } // Audio System device with no Playback device type Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +4 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,10 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { mAddress, mService.getPhysicalAddress(), mDeviceType)); mService.sendCecCommand(HdmiCecMessageBuilder.buildDeviceVendorIdCommand( mAddress, mService.getVendorId())); // Actively send out an OSD name to the TV to update the TV panel in case the TV // does not query the OSD name on time. This is not a required behavior by the spec. // It is used for some TVs that need the OSD name update but don't query it themselves. buildAndSendSetOsdName(Constants.ADDR_TV); if (mService.audioSystem() == null) { // If current device is not a functional audio system device, // send message to potential audio system device in the system to get the system Loading Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +16 −4 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.Nullable; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.IHdmiControlCallback; import android.hardware.input.InputManager; import android.hardware.tv.cec.V1_0.SendMessageResult; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -426,15 +427,26 @@ abstract class HdmiCecLocalDevice { assertRunOnServiceThread(); // Note that since this method is called after logical address allocation is done, // mDeviceInfo should not be null. buildAndSendSetOsdName(message.getSource()); return true; } protected void buildAndSendSetOsdName(int dest) { HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildSetOsdNameCommand( mAddress, message.getSource(), mDeviceInfo.getDisplayName()); mAddress, dest, mDeviceInfo.getDisplayName()); if (cecMessage != null) { mService.sendCecCommand(cecMessage); mService.sendCecCommand(cecMessage, new SendMessageCallback() { @Override public void onSendCompleted(int error) { if (error != SendMessageResult.SUCCESS) { HdmiLogger.debug("Failed to send cec command " + cecMessage); } } }); } else { Slog.w(TAG, "Failed to build <Get Osd Name>:" + mDeviceInfo.getDisplayName()); } return true; } // Audio System device with no Playback device type Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +4 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,10 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { mAddress, mService.getPhysicalAddress(), mDeviceType)); mService.sendCecCommand(HdmiCecMessageBuilder.buildDeviceVendorIdCommand( mAddress, mService.getVendorId())); // Actively send out an OSD name to the TV to update the TV panel in case the TV // does not query the OSD name on time. This is not a required behavior by the spec. // It is used for some TVs that need the OSD name update but don't query it themselves. buildAndSendSetOsdName(Constants.ADDR_TV); if (mService.audioSystem() == null) { // If current device is not a functional audio system device, // send message to potential audio system device in the system to get the system Loading