gltrace: Make sure device is debuggable.

(cherry picked from commit 6482fa4db0)

Change-Id: I205aabcab1932025c12e7ba3d1b3cf94684f6758
This commit is contained in:
Siva Velusamy 2012-11-20 13:39:57 -08:00
parent 764c197c6f
commit a9a4cd4806
1 changed files with 6 additions and 0 deletions

View File

@ -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();