Usb: Populate UsbDataStatus only when not populated am: cac33c008f am: 0223780d96 am: 74519240ec

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/23255181

Change-Id: Iefca588c05ae080ca508616105b34d5f1fd6118e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Badhri Jagan Sridharan 2023-05-18 03:40:45 +00:00 committed by Automerger Merge Worker
commit fdf7d14527

View file

@ -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;