diff options
| author | 2019-02-19 16:00:25 -0800 | |
|---|---|---|
| committer | 2019-02-19 16:00:25 -0800 | |
| commit | 96c01713848f2ec02b5cd246bc15b9138a1e724b (patch) | |
| tree | 47f34f9286be628348b42f8b22408a947204e3a8 /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | 7127e80071e32f12a2fa45d97303236a658cdd3f (diff) | |
Game Driver: update the format of driver build date
This change updates the original string base driver build date to
int64_t based driver build time. The build time is the Unix epoch
timestamp.
Bug: 123156461
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: Ia9e0c64c5dfa6f4bb84a0c05e982b481079158a7
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 386f9f0dfb..6e5324ee47 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -158,24 +158,23 @@ void GraphicsEnv::setDriverPath(const std::string path) { void GraphicsEnv::setGpuStats(const std::string& driverPackageName, const std::string& driverVersionName, uint64_t driverVersionCode, - const std::string& driverBuildDate, - const std::string& appPackageName) { + int64_t driverBuildTime, const std::string& appPackageName) { ATRACE_CALL(); std::lock_guard<std::mutex> lock(mStatsLock); ALOGV("setGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" - "\tdriverVersionCode[%llu]\n" - "\tdriverBuildDate[%s]\n" + "\tdriverVersionCode[%" PRIu64 "]\n" + "\tdriverBuildTime[%" PRId64 "]\n" "\tappPackageName[%s]\n", - driverPackageName.c_str(), driverVersionName.c_str(), - (unsigned long long)driverVersionCode, driverBuildDate.c_str(), appPackageName.c_str()); + driverPackageName.c_str(), driverVersionName.c_str(), driverVersionCode, driverBuildTime, + appPackageName.c_str()); mGpuStats.driverPackageName = driverPackageName; mGpuStats.driverVersionName = driverVersionName; mGpuStats.driverVersionCode = driverVersionCode; - mGpuStats.driverBuildDate = driverBuildDate; + mGpuStats.driverBuildTime = driverBuildTime; mGpuStats.appPackageName = appPackageName; } @@ -264,21 +263,20 @@ void GraphicsEnv::sendGpuStatsLocked(GraphicsEnv::Driver driver, bool isDriverLo ALOGV("sendGpuStats:\n" "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" - "\tdriverVersionCode[%llu]\n" - "\tdriverBuildDate[%s]\n" + "\tdriverVersionCode[%" PRIu64 "]\n" + "\tdriverBuildTime[%" PRId64 "]\n" "\tappPackageName[%s]\n" "\tdriver[%d]\n" "\tisDriverLoaded[%d]\n" - "\tdriverLoadingTime[%lld]", + "\tdriverLoadingTime[%" PRId64 "]", mGpuStats.driverPackageName.c_str(), mGpuStats.driverVersionName.c_str(), - (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.driverBuildDate.c_str(), - mGpuStats.appPackageName.c_str(), static_cast<int32_t>(driver), isDriverLoaded, - (long long)driverLoadingTime); + mGpuStats.driverVersionCode, mGpuStats.driverBuildTime, mGpuStats.appPackageName.c_str(), + static_cast<int32_t>(driver), isDriverLoaded, driverLoadingTime); const sp<IGpuService> gpuService = getGpuService(); if (gpuService) { gpuService->setGpuStats(mGpuStats.driverPackageName, mGpuStats.driverVersionName, - mGpuStats.driverVersionCode, mGpuStats.driverBuildDate, + mGpuStats.driverVersionCode, mGpuStats.driverBuildTime, mGpuStats.appPackageName, driver, isDriverLoaded, driverLoadingTime); } |