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

Commit 86b136a4 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

liblog: __android_logger_property_bool svelte+eng default

(cherry pick from commit 9fcaaba8)

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
parent a190551d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -459,6 +459,9 @@ LIBLOG_ABI_PRIVATE bool __android_logger_property_get_bool(const char* key,
  if (check_flag(property.property, "false")) {
    return false;
  }
  if (property.property[0]) {
    flag &= ~(BOOL_DEFAULT_FLAG_ENG | BOOL_DEFAULT_FLAG_SVELTE);
  }
  if (check_flag(property.property, "eng")) {
    flag |= BOOL_DEFAULT_FLAG_ENG;
  }