Merge "Force logging level to warning for user builds"

This commit is contained in:
Linux Build Service Account 2014-02-20 15:25:52 -08:00 committed by Gerrit - the friendly Code Review server
commit 2ad8b7329c
2 changed files with 10 additions and 2 deletions

View file

@ -21,11 +21,14 @@ LOCAL_SRC_FILES += \
loc_timer.c \
../platform_lib_abstractions/elapsed_millis_since_boot.cpp
LOCAL_CFLAGS += \
-fno-short-enums \
-D_ANDROID_
ifeq ($(TARGET_BUILD_VARIANT),user)
LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
endif
LOCAL_LDFLAGS += -Wl,--export-dynamic
## Includes
@ -45,7 +48,6 @@ LOCAL_COPY_HEADERS:= \
../platform_lib_abstractions/platform_lib_time.h \
../platform_lib_abstractions/platform_lib_macros.h
LOCAL_MODULE := libgps.utils
LOCAL_MODULE_TAGS := optional

View file

@ -200,6 +200,12 @@ SIDE EFFECTS
void loc_logger_init(unsigned long debug, unsigned long timestamp)
{
loc_logger.DEBUG_LEVEL = debug;
#ifdef TARGET_BUILD_VARIANT_USER
// force user builds to 2 or less
if (loc_logger.DEBUG_LEVEL > 2) {
loc_logger.DEBUG_LEVEL = 2;
}
#endif
loc_logger.TIMESTAMP = timestamp;
}