diff options
author | Qian-Hao Huang <qhhuang@google.com> | 2023-12-05 09:36:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-12-05 09:36:28 +0000 |
commit | a83201a117bbb67201d4cc4a4ba67622588a9f8c (patch) | |
tree | 7fb79e0c1f9456cf651199859caabb1191e5c577 | |
parent | 8b898807764292f29a4cadfe7ad9b501072988c1 (diff) | |
download | pixel-a83201a117bbb67201d4cc4a4ba67622588a9f8c.tar.gz |
Revert "Use boot_clock for BuildVendorUsbDataSessionEvent"
Revert submission 25524752-usbDataSessionMonitor
Reason for revert: Test for gs101/gs201 boot blocking issue (b/314904288)
Reverted changes: /q/submissionid:25524752-usbDataSessionMonitor
Change-Id: I18aeb8be9d5c2ad405957857aeb41e296c6a1dd2
-rw-r--r-- | usb/CommonUtils.cpp | 6 | ||||
-rw-r--r-- | usb/include/pixelusb/CommonUtils.h | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/usb/CommonUtils.cpp b/usb/CommonUtils.cpp index 6e0f08c9..91688b98 100644 --- a/usb/CommonUtils.cpp +++ b/usb/CommonUtils.cpp @@ -200,10 +200,10 @@ static VendorUsbDataSessionEvent_UsbDeviceState stringToUsbDeviceStateProto( } } -void BuildVendorUsbDataSessionEvent(bool is_host, boot_clock::time_point currentTime, - boot_clock::time_point startTime, +void BuildVendorUsbDataSessionEvent(bool is_host, steady_clock::time_point currentTime, + steady_clock::time_point startTime, std::vector<std::string> *states, - std::vector<boot_clock::time_point> *timestamps, + std::vector<steady_clock::time_point> *timestamps, VendorUsbDataSessionEvent *event) { if (is_host) { event->set_usb_role(VendorUsbDataSessionEvent_UsbDataRole_USB_ROLE_HOST); diff --git a/usb/include/pixelusb/CommonUtils.h b/usb/include/pixelusb/CommonUtils.h index dbd59c63..93855be3 100644 --- a/usb/include/pixelusb/CommonUtils.h +++ b/usb/include/pixelusb/CommonUtils.h @@ -17,7 +17,6 @@ #ifndef HARDWARE_GOOGLE_PIXEL_USB_UTILSCOMMON_H_ #define HARDWARE_GOOGLE_PIXEL_USB_UTILSCOMMON_H_ -#include <android-base/chrono_utils.h> #include <android-base/unique_fd.h> #include <hardware/google/pixel/pixelstats/pixelatoms.pb.h> @@ -59,8 +58,8 @@ constexpr char kUvcEnabled[] = "ro.usb.uvc.enabled"; #define FUNCTION_PATH CONFIG_PATH FUNCTION_NAME #define RNDIS_PATH FUNCTIONS_PATH "gsi.rndis" -using ::android::base::boot_clock; using android::hardware::google::pixel::PixelAtoms::VendorUsbDataSessionEvent; +using ::std::chrono::steady_clock; // Adds the given fd to the epollfd(epfd). int addEpollFd(const ::android::base::unique_fd &epfd, const ::android::base::unique_fd &fd); @@ -74,10 +73,10 @@ int linkFunction(const char *function, int index); bool setVidPidCommon(const char *vid, const char *pid); // Pulls down USB gadget. Returns true on success, false on failure bool resetGadgetCommon(); -void BuildVendorUsbDataSessionEvent(bool is_host, boot_clock::time_point currentTime, - boot_clock::time_point startTime, +void BuildVendorUsbDataSessionEvent(bool is_host, steady_clock::time_point currentTime, + steady_clock::time_point startTime, std::vector<std::string> *states, - std::vector<boot_clock::time_point> *timestamps, + std::vector<steady_clock::time_point> *timestamps, VendorUsbDataSessionEvent *event); } // namespace usb |