diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2023-03-25 10:25:00 +0000 |
---|---|---|
committer | Badhri Jagan Sridharan <badhri@google.com> | 2023-03-27 05:57:47 +0000 |
commit | 1e3b4431f4d60c0e69d3d97b3c74f85663c50d4a (patch) | |
tree | 8f85d86a15743d47c40ec3b24be9fc0e5118b108 | |
parent | 44ca8b2554671b3cd5f4adb8f16f4d620b9fe35f (diff) | |
download | gs201-1e3b4431f4d60c0e69d3d97b3c74f85663c50d4a.tar.gz |
Usb: Update UsbDataStatus while being docked
Bug: 275150939
Change-Id: I09499642012c7e95bb5a5fef1ac6eb7b8c4e6832
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
-rw-r--r-- | usb/usb/Usb.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index 3e4f8a1..617b3f2 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -777,7 +777,13 @@ Status getPortStatusHelper(android::hardware::usb::Usb *usb, string pogoUsbActive = "0"; if (ReadFileToString(string(kPogoUsbActive), &pogoUsbActive) && 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; } if (!usb->mUsbDataEnabled) { |