Use const reference in setGpuStats() API
Rather than make a copy of these strings when the function is
called, we pass them by const reference.
Test: TreeHugger
Change-Id: Ief53fea1f6df191181e00eab978cf53b5a2ab91d
diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp
index 98a6395..762a27b 100644
--- a/libs/graphicsenv/IGpuService.cpp
+++ b/libs/graphicsenv/IGpuService.cpp
@@ -27,9 +27,9 @@
public:
explicit BpGpuService(const sp<IBinder>& impl) : BpInterface<IGpuService>(impl) {}
- virtual void setGpuStats(const std::string driverPackageName,
- const std::string driverVersionName, const uint64_t driverVersionCode,
- const std::string appPackageName) {
+ virtual void setGpuStats(const std::string& driverPackageName,
+ const std::string& driverVersionName, const uint64_t driverVersionCode,
+ const std::string& appPackageName) {
Parcel data, reply;
data.writeInterfaceToken(IGpuService::getInterfaceDescriptor());