Merge "Enable power hal to unblock thermal restart under off mode charge" into main
diff --git a/power-libperfmgr/libperfmgr/tests/RequestGroupTest.cc b/power-libperfmgr/libperfmgr/tests/RequestGroupTest.cc
index 8021a7e..c23c821 100644
--- a/power-libperfmgr/libperfmgr/tests/RequestGroupTest.cc
+++ b/power-libperfmgr/libperfmgr/tests/RequestGroupTest.cc
@@ -63,7 +63,7 @@
ReqTime::max() - std::chrono::steady_clock::now());
EXPECT_NEAR(expect.count(), expire_time.count(), kTIMING_TOLERANCE_MS);
// expire time is greater than 1 year
- EXPECT_LE(365 * 24 * 60 * 60 * 1000, expire_time.count());
+ EXPECT_LE(365ll * 24 * 60 * 60 * 1000, expire_time.count());
EXPECT_EQ(true, active);
}
diff --git a/thermal/Android.bp b/thermal/Android.bp
index a7ad5d8..afd3c81 100644
--- a/thermal/Android.bp
+++ b/thermal/Android.bp
@@ -34,7 +34,7 @@
"libbinder_ndk",
"android.frameworks.stats-V2-ndk",
"android.hardware.power-V1-ndk",
- "android.hardware.thermal-V1-ndk",
+ "android.hardware.thermal-V2-ndk",
"pixel-power-ext-V1-ndk",
"pixelatoms-cpp",
],
@@ -92,7 +92,7 @@
"libbinder_ndk",
"android.frameworks.stats-V2-ndk",
"android.hardware.power-V1-ndk",
- "android.hardware.thermal-V1-ndk",
+ "android.hardware.thermal-V2-ndk",
"pixel-power-ext-V1-ndk",
"pixelatoms-cpp",
],
diff --git a/thermal/android.hardware.thermal-service.pixel.xml b/thermal/android.hardware.thermal-service.pixel.xml
index bdee744..08dc68c 100644
--- a/thermal/android.hardware.thermal-service.pixel.xml
+++ b/thermal/android.hardware.thermal-service.pixel.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.thermal</name>
- <version>1</version>
+ <version>2</version>
<fqname>IThermal/default</fqname>
</hal>
</manifest>
diff --git a/usb/CommonUtils.cpp b/usb/CommonUtils.cpp
index 91688b9..6e0f08c 100644
--- a/usb/CommonUtils.cpp
+++ b/usb/CommonUtils.cpp
@@ -200,10 +200,10 @@
}
}
-void BuildVendorUsbDataSessionEvent(bool is_host, steady_clock::time_point currentTime,
- steady_clock::time_point startTime,
+void BuildVendorUsbDataSessionEvent(bool is_host, boot_clock::time_point currentTime,
+ boot_clock::time_point startTime,
std::vector<std::string> *states,
- std::vector<steady_clock::time_point> *timestamps,
+ std::vector<boot_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 93855be..dbd59c6 100644
--- a/usb/include/pixelusb/CommonUtils.h
+++ b/usb/include/pixelusb/CommonUtils.h
@@ -17,6 +17,7 @@
#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>
@@ -58,8 +59,8 @@
#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);
@@ -73,10 +74,10 @@
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, steady_clock::time_point currentTime,
- steady_clock::time_point startTime,
+void BuildVendorUsbDataSessionEvent(bool is_host, boot_clock::time_point currentTime,
+ boot_clock::time_point startTime,
std::vector<std::string> *states,
- std::vector<steady_clock::time_point> *timestamps,
+ std::vector<boot_clock::time_point> *timestamps,
VendorUsbDataSessionEvent *event);
} // namespace usb