From 1e2dbdb614546f3b53dd52febbca4c871279545e Mon Sep 17 00:00:00 2001 From: Amy Date: Tue, 12 Feb 2019 11:23:00 -0800 Subject: [PATCH] Framework should wait for the device to report physical address when the device is just plugged in. Note that we don't want to flood the CEC bus so we should not do device discovery everytime when there is device plugged in. We can wait for the device to report its own system info then add it to the remote device list. We update TIF after getting this information. Test: manual Change-Id: I72f8638d50d2c14826b52d9693fdedc6ee108b05 (cherry picked from commit 4568823bf7d3532789a2e1d8f99d827e3fe35a88) --- .../server/hdmi/HdmiCecLocalDeviceAudioSystem.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java index 67109867c0742..eeeb9b0487699 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java @@ -248,12 +248,8 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource { } if (mService.getPortInfo(portId).getType() == HdmiPortInfo.PORT_OUTPUT) { mCecMessageCache.flushAll(); - } else { - if (connected) { - launchDeviceDiscovery(); - } else { - // TODO(amyjojo): remove device from mDeviceInfo - } + } else if (!connected){ + // TODO(amyjojo): remove device from mDeviceInfo } }