summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-11-20 13:39:57 -0800
committerSiva Velusamy <vsiva@google.com>2012-11-20 15:55:35 -0800
commita9a4cd4806ea5b2cf525c8ab4c6604d78c6e3f8f (patch)
tree2d563fcf21d76054c617566a745c4d3c5f83f780
parent764c197c6fc2bf10b038c33b320a4e95594d52d8 (diff)
downloadframeworks_native-a9a4cd4806ea5b2cf525c8ab4c6604d78c6e3f8f.zip
frameworks_native-a9a4cd4806ea5b2cf525c8ab4c6604d78c6e3f8f.tar.gz
frameworks_native-a9a4cd4806ea5b2cf525c8ab4c6604d78c6e3f8f.tar.bz2
gltrace: Make sure device is debuggable.
(cherry picked from commit 6482fa4db0a7ac99cd3503d6bf170f80b26fb695) Change-Id: I205aabcab1932025c12e7ba3d1b3cf94684f6758
-rw-r--r--opengl/libs/EGL/egl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 96e1cba..0d4bed5 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -124,6 +124,12 @@ void initEglTraceLevel() {
void initEglDebugLevel() {
int propertyLevel = 0;
char value[PROPERTY_VALUE_MAX];
+
+ // check system property only on userdebug or eng builds
+ property_get("ro.debuggable", value, "0");
+ if (value[0] == '0')
+ return;
+
property_get("debug.egl.debug_proc", value, "");
if (strlen(value) > 0) {
long pid = getpid();