Usb: Populate connected status of non compliant port partners only when not populated
Set mode, power role and data role on non compliant port partners only if the portStatus is not already populated. Compliance warnings such as missing rp do not populate these fields during getPortStatusHelper Test: manual test on device Bug: 279251052 Bug: 301380358 Change-Id: Ibe71bdd5c521ba90c124d89bd56af90087c0df18
This commit is contained in:
parent
0991cd02ca
commit
3c94c8bb80
1 changed files with 2 additions and 1 deletions
|
@ -355,7 +355,8 @@ Status queryNonCompliantChargerStatus(std::vector<PortStatus> *currentPortStatus
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((*currentPortStatus)[i].complianceWarnings.size() > 0) {
|
if ((*currentPortStatus)[i].complianceWarnings.size() > 0 &&
|
||||||
|
(*currentPortStatus)[i].currentPowerRole == PortPowerRole::NONE) {
|
||||||
(*currentPortStatus)[i].currentMode = PortMode::UFP;
|
(*currentPortStatus)[i].currentMode = PortMode::UFP;
|
||||||
(*currentPortStatus)[i].currentPowerRole = PortPowerRole::SINK;
|
(*currentPortStatus)[i].currentPowerRole = PortPowerRole::SINK;
|
||||||
(*currentPortStatus)[i].currentDataRole = PortDataRole::NONE;
|
(*currentPortStatus)[i].currentDataRole = PortDataRole::NONE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue