logd: use __android_log_is_debuggable() am: 5740a46e4e am: f606721b59
am: 3b621f4cab

Change-Id: I258a7e428bb17954643acff82ee666fc4596915e
diff --git a/logd/main.cpp b/logd/main.cpp
index a0cea25..c47f396 100644
--- a/logd/main.cpp
+++ b/logd/main.cpp
@@ -44,6 +44,7 @@
 #include <log/event_tag_map.h>
 #include <packagelistparser/packagelistparser.h>
 #include <private/android_filesystem_config.h>
+#include <private/android_logger.h>
 #include <scoped_minijail.h>
 #include <utils/threads.h>
 
@@ -174,11 +175,8 @@
                                  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;