Usb: Update UsbDataStatus while being docked am: 1e3b4431f4

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

Change-Id: If859fcbec66f29c1a01060694e4e30c64eb646c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Badhri Jagan Sridharan 2023-03-27 06:27:43 +00:00 committed by Automerger Merge Worker
commit 1ced223e00

View file

@ -777,7 +777,13 @@ Status getPortStatusHelper(android::hardware::usb::Usb *usb,
string pogoUsbActive = "0"; string pogoUsbActive = "0";
if (ReadFileToString(string(kPogoUsbActive), &pogoUsbActive) && if (ReadFileToString(string(kPogoUsbActive), &pogoUsbActive) &&
stoi(Trim(pogoUsbActive)) == 1) { stoi(Trim(pogoUsbActive)) == 1) {
(*currentPortStatus)[i].usbDataStatus.push_back(UsbDataStatus::DISABLED_DOCK); /*
* Always signal USB device mode disabled irrespective of hub enabled while docked.
* Hub gets automatically enabled as needed. Signalling DISABLED_DOCK_HOST_MODE &
* DEVICE_MODE during pogo direct can cause notifications to show for brief windows
* when the state machine is still moving to steady state.
*/
(*currentPortStatus)[i].usbDataStatus.push_back(UsbDataStatus::DISABLED_DOCK_DEVICE_MODE);
dataEnabled = false; dataEnabled = false;
} }
if (!usb->mUsbDataEnabled) { if (!usb->mUsbDataEnabled) {