Usb: Populate UsbDataStatus only when not populated am: 877a72ffdf

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

Change-Id: I030484aec7cea2d4288da61e6c3cfee7c864fd5e
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 04:51:12 +00:00 committed by Automerger Merge Worker
commit 2cc81a02de

View file

@ -327,7 +327,8 @@ Status queryNonCompliantChargerStatus(std::vector<PortStatus> *currentPortStatus
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].currentPowerRole = PortPowerRole::SINK;
(*currentPortStatus)[i].currentDataRole = PortDataRole::NONE;