logd: use __android_log_is_debuggable()
Test: gTest logd-unit-tests Bug: 27566046 Bug: 31456426 Change-Id: I9faf88263fe62ce5bba80dc2cb928e6dbe73dbb2
This commit is contained in:
parent
b5aa4e7125
commit
5740a46e4e
1 changed files with 3 additions and 5 deletions
|
|
@ -44,6 +44,7 @@
|
||||||
#include <log/event_tag_map.h>
|
#include <log/event_tag_map.h>
|
||||||
#include <packagelistparser/packagelistparser.h>
|
#include <packagelistparser/packagelistparser.h>
|
||||||
#include <private/android_filesystem_config.h>
|
#include <private/android_filesystem_config.h>
|
||||||
|
#include <private/android_logger.h>
|
||||||
#include <scoped_minijail.h>
|
#include <scoped_minijail.h>
|
||||||
#include <utils/threads.h>
|
#include <utils/threads.h>
|
||||||
|
|
||||||
|
|
@ -174,11 +175,8 @@ bool property_get_bool(const char *key, int flag) {
|
||||||
BOOL_DEFAULT_FALSE)) {
|
BOOL_DEFAULT_FALSE)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (flag & BOOL_DEFAULT_FLAG_ENG) {
|
if ((flag & BOOL_DEFAULT_FLAG_ENG) && !__android_log_is_debuggable()) {
|
||||||
property_get("ro.debuggable", property, "");
|
return false;
|
||||||
if (strcmp(property, "1")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (flag & BOOL_DEFAULT_FLAG_TRUE_FALSE) != BOOL_DEFAULT_FALSE;
|
return (flag & BOOL_DEFAULT_FLAG_TRUE_FALSE) != BOOL_DEFAULT_FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue