diff --git a/logd/main.cpp b/logd/main.cpp index a0cea25cf..c47f3964c 100644 --- a/logd/main.cpp +++ b/logd/main.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -174,11 +175,8 @@ bool property_get_bool(const char *key, int flag) { BOOL_DEFAULT_FALSE)) { return false; } - if (flag & BOOL_DEFAULT_FLAG_ENG) { - property_get("ro.debuggable", property, ""); - if (strcmp(property, "1")) { - return false; - } + if ((flag & BOOL_DEFAULT_FLAG_ENG) && !__android_log_is_debuggable()) { + return false; } return (flag & BOOL_DEFAULT_FLAG_TRUE_FALSE) != BOOL_DEFAULT_FALSE;