diff options
author | Ray Chi <raychi@google.com> | 2021-04-23 14:53:44 +0800 |
---|---|---|
committer | Ray Chi <raychi@google.com> | 2021-04-23 14:53:44 +0800 |
commit | 9d3491c96cf4cadc48253a7113a26c80fcb7cdf2 (patch) | |
tree | 2abf688a2609dd1f88d7d69905897b3d1aecee6a | |
parent | 6f5388224f1f57bb3e5717510cdf6b3836a211fb (diff) | |
download | redfin-9d3491c96cf4cadc48253a7113a26c80fcb7cdf2.tar.gz |
redfin: usb: add state of usb extcon to monitorffs
Monitorffs needs to check the state of usb extcon to pull up
USB gadget. Therefore, this patch add state of usb extcon and
send this information to monitorffs.
Bug: 173086594
Test: verified pass
Change-Id: I29df29efcf55118241f0ca7072b034c1fb5a37f2
-rw-r--r-- | usb/UsbGadget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usb/UsbGadget.h b/usb/UsbGadget.h index 93c7d66..32b173f 100644 --- a/usb/UsbGadget.h +++ b/usb/UsbGadget.h @@ -66,7 +66,8 @@ using ::android::hardware::usb::gadget::V1_1::IUsbGadget; using ::std::string; constexpr char kGadgetName[] = "a600000.dwc3"; -static MonitorFfs monitorFfs(kGadgetName); +constexpr char kExtconUsbState[] = "/sys/class/extcon/extcon4/cable.0/state"; +static MonitorFfs monitorFfs(kGadgetName, kExtconUsbState); struct UsbGadget : public IUsbGadget { UsbGadget(); |