CEC: Update port info on hotplug events.
Update HdmiControlService#mPortInfo when hotplug events occur. Bug: 159806029 Test: manual Test: atest CtsHdmiCecHostTestCases Change-Id: I590f7579dfb17d1b6ac0151829e5696966e93700
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user