Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ea359fc authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()

Allow our own libraries to use this privately instead of
running the less efficient get_properties and doing the math.

Test: compile and boot smoke test
Bug: 27566046
Bug: 31456426
Change-Id: I2f677276d27fbcb6af01b600ac1d9891c8938d43
parent 955648a9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -130,6 +130,8 @@ int __android_log_security_bwrite(int32_t tag, const void *payload, size_t len);
int __android_log_security_bswrite(int32_t tag, const char *payload);
int __android_log_security(); /* Device Owner is present */

int __android_log_is_debuggable();

#if defined(__cplusplus)
}
#endif
+5 −0
Original line number Diff line number Diff line
@@ -727,3 +727,8 @@ LIBLOG_ABI_PUBLIC int __android_log_is_loggable_len(int prio,
    int logLevel = def;
    return logLevel >= 0 && prio >= logLevel;
}

LIBLOG_ABI_PRIVATE int __android_log_is_debuggable()
{
    return 1;
}
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio,
    return logLevel >= 0 && prio >= logLevel;
}

LIBLOG_HIDDEN int __android_log_is_debuggable()
LIBLOG_ABI_PRIVATE int __android_log_is_debuggable()
{
    static uint32_t serial;
    static struct cache tag_cache;
+0 −1
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@ static inline uid_t __android_log_uid() { return getuid(); }
LIBLOG_HIDDEN void __android_log_lock();
LIBLOG_HIDDEN int __android_log_trylock();
LIBLOG_HIDDEN void __android_log_unlock();
LIBLOG_HIDDEN int __android_log_is_debuggable();

__END_DECLS