Merge "GpuStats: Cache the gpu service binder"
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index c5d5f71..3e29e88 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -258,7 +258,7 @@
}
static sp<IGpuService> getGpuService() {
- const sp<IBinder> binder = defaultServiceManager()->checkService(String16("gpu"));
+ static const sp<IBinder> binder = defaultServiceManager()->checkService(String16("gpu"));
if (!binder) {
ALOGE("Failed to get gpu service");
return nullptr;