summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aravind Angadi <aravind.angadi@ittiam.com> 2021-06-25 17:37:51 +0530
committer Yan Han <yanha@google.com> 2021-07-22 11:52:33 +0200
commite73d20617efccd0eb8c1fd604147fadef62222d3 (patch)
treefd06a0d0241972d62a20c42dc24974d00a554f08
parentb32f11ca5c114f36779a86d47bbfaf8b054ff944 (diff)
CEC: Update port info on hotplug events.
Update HdmiControlService#mPortInfo when hotplug events occur. Bug: 159806029 Test: manual Test: atest CtsHdmiCecHostTestCases Change-Id: I590f7579dfb17d1b6ac0151829e5696966e93700
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiControlService.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index c56610cff2eb..d3aa3fabd3e5 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -1239,13 +1239,11 @@ public class HdmiControlService extends SystemService {
@ServiceThreadOnly
void onHotplug(int portId, boolean connected) {
assertRunOnServiceThread();
+ // initPortInfo at hotplug event.
+ mHdmiCecNetwork.initPortInfo();
if (connected && !isTvDevice()
&& getPortInfo(portId).getType() == HdmiPortInfo.PORT_OUTPUT) {
- if (isSwitchDevice()) {
- mHdmiCecNetwork.initPortInfo();
- HdmiLogger.debug("initPortInfo for switch device when onHotplug from tx.");
- }
ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
for (int type : mLocalDevices) {
HdmiCecLocalDevice localDevice = mHdmiCecNetwork.getLocalDevice(type);