summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2017-04-18 10:43:16 -0500
committerMark Salyzyn2017-04-18 17:36:36 -0500
commit9fcaaba85ddee7ca181901b7409ef3eb2962a7d8 (patch)
tree0581a16d041aa6ee20da2b13771eb37721f8f834 /liblog/properties.c
parentedaed3ed7a6034bd0bd07e55585b6c81333b9d3a (diff)
downloadplatform-system-core-9fcaaba85ddee7ca181901b7409ef3eb2962a7d8.tar.gz
platform-system-core-9fcaaba85ddee7ca181901b7409ef3eb2962a7d8.tar.xz
platform-system-core-9fcaaba85ddee7ca181901b7409ef3eb2962a7d8.zip
liblog: __android_logger_property_bool svelte+eng default
When BOOL_DEFAULT_FLAG_ENG and/or BOOL_DEFAULT_FLAG_SVELTE is set for flags parameter in __android_logger_property_get_bool, they can not be overridden by a supplied property value. Reset these two flags if there is something in the specified property. Test: gTest liblog-unit-tests, logcat-unit-tests and logd-unit-tests Bug: 37425809 Change-Id: I5fc2d727e8c30bc1e781f8b365f44ec62dd36b4d
Diffstat (limited to 'liblog/properties.c')
-rw-r--r--liblog/properties.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/liblog/properties.c b/liblog/properties.c
index c71cbcfc1..11be8279f 100644
--- a/liblog/properties.c
+++ b/liblog/properties.c
@@ -459,6 +459,9 @@ LIBLOG_ABI_PRIVATE bool __android_logger_property_get_bool(const char* key,
459 if (check_flag(property.property, "false")) { 459 if (check_flag(property.property, "false")) {
460 return false; 460 return false;
461 } 461 }
462 if (property.property[0]) {
463 flag &= ~(BOOL_DEFAULT_FLAG_ENG | BOOL_DEFAULT_FLAG_SVELTE);
464 }
462 if (check_flag(property.property, "eng")) { 465 if (check_flag(property.property, "eng")) {
463 flag |= BOOL_DEFAULT_FLAG_ENG; 466 flag |= BOOL_DEFAULT_FLAG_ENG;
464 } 467 }