Usb: Populate UsbDataStatus only when not populated
Do not override UsbDataStatus when already populated. Compliance warnings such as missing Rp do not populate UsbDataStatus and the port partner is detected. Populate UsbDataStatus only when not populated. Bug: 279251052 Change-Id: Ibe71bdd5c521ba90c124d89bd56af90087c0df18 (cherry picked from commit 47e1400c8fef8af1aea985795d7adfe3ff16871b)
This commit is contained in:
parent
4c74d00f98
commit
cac33c008f
1 changed files with 2 additions and 1 deletions
|
@ -312,7 +312,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