Force logging level to warning for user builds

User builds should not be logging at info level

Change-Id: I4e43730d52b3a322e93d61112805fa85669db243
CRs-fixed: 610927
This commit is contained in:
Dante Russo 2014-02-04 09:58:01 -08:00 committed by Kevin Tang
parent 3cf2a8f3b7
commit 7c41d446d9
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;
}