libcutils: compile with BOARD_VNDK_VERSION current
- moved __android_log_is_debuggable to a new public header (log_properties.h) - vendor version of sched_policy uses ALOG* instead SLOG* Test: (sanity) liblog-unit-tests Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue to fail) Test: system/core as a whole makes with BOARD_VNDK_VERSION := current now with no problems. Test: boots/works on internal marlin Bug: 33241851 Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
This commit is contained in:
parent
421067e040
commit
1f83aa424f
16 changed files with 59 additions and 11 deletions
|
@ -32,10 +32,10 @@
|
|||
#include <android-base/properties.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <libminijail.h>
|
||||
#include <log/log_properties.h>
|
||||
#include <scoped_minijail.h>
|
||||
|
||||
#include <private/android_filesystem_config.h>
|
||||
#include <private/android_logger.h>
|
||||
#include "debuggerd/handler.h"
|
||||
#include "selinux/android.h"
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <android-base/properties.h>
|
||||
#include <bootloader_message/bootloader_message.h>
|
||||
#include <cutils/android_reboot.h>
|
||||
#include <private/android_logger.h>
|
||||
#include <log/log_properties.h>
|
||||
#endif
|
||||
|
||||
#include "adb.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "android-base/properties.h"
|
||||
#include "android-base/stringprintf.h"
|
||||
#include <private/android_logger.h>
|
||||
#include <log/log_properties.h>
|
||||
|
||||
#include "adb.h"
|
||||
#include "adb_io.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#if !ADB_HOST
|
||||
#include <android-base/properties.h>
|
||||
#include <private/android_logger.h>
|
||||
#include <log/log_properties.h>
|
||||
#endif
|
||||
|
||||
#include "adb.h"
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/magic.h>
|
||||
#include <log/log_properties.h>
|
||||
#include <logwrap/logwrap.h>
|
||||
#include <private/android_logger.h> // for __android_log_is_debuggable()
|
||||
|
||||
#include "fs_mgr.h"
|
||||
#include "fs_mgr_avb.h"
|
||||
|
|
|
@ -144,7 +144,10 @@ cc_library {
|
|||
},
|
||||
|
||||
shared_libs: ["liblog"],
|
||||
header_libs: ["libcutils_headers"],
|
||||
header_libs: [
|
||||
"libcutils_headers",
|
||||
"libutils_headers",
|
||||
],
|
||||
export_header_lib_headers: ["libcutils_headers"],
|
||||
|
||||
cflags: [
|
||||
|
|
|
@ -28,6 +28,13 @@
|
|||
|
||||
#define UNUSED __attribute__((__unused__))
|
||||
|
||||
#ifndef SLOGE
|
||||
#define SLOGE ALOGE
|
||||
#endif
|
||||
#ifndef SLOGW
|
||||
#define SLOGW ALOGW
|
||||
#endif
|
||||
|
||||
/* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged.
|
||||
* Call this any place a SchedPolicy is used as an input parameter.
|
||||
* Returns the possibly re-mapped policy.
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#include <cutils/compiler.h>
|
||||
#include <cutils/properties.h>
|
||||
#include <cutils/trace.h>
|
||||
#include <private/android_logger.h>
|
||||
#include <log/log.h>
|
||||
#include <log/log_properties.h>
|
||||
|
||||
/**
|
||||
* Maximum size of a message that can be logged to the trace buffer.
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <unordered_map>
|
||||
|
||||
#include <log/event_tag_map.h>
|
||||
#include <log/log_properties.h>
|
||||
#include <private/android_logger.h>
|
||||
#include <utils/FastStrcmp.h>
|
||||
#include <utils/RWLock.h>
|
||||
|
|
35
liblog/include/log/log_properties.h
Normal file
35
liblog/include/log/log_properties.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
**
|
||||
** Copyright 2017, The Android Open Source Project
|
||||
**
|
||||
** This file is dual licensed. It may be redistributed and/or modified
|
||||
** under the terms of the Apache 2.0 License OR version 2 of the GNU
|
||||
** General Public License.
|
||||
*/
|
||||
|
||||
#ifndef _LIBS_LOG_PROPERTIES_H
|
||||
#define _LIBS_LOG_PROPERTIES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE
|
||||
#ifndef __ANDROID_API__
|
||||
#define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 1
|
||||
#elif __ANDROID_API__ > 24 /* > Nougat */
|
||||
#define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 1
|
||||
#else
|
||||
#define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE
|
||||
int __android_log_is_debuggable();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBS_LOG_PROPERTIES_H */
|
|
@ -135,8 +135,6 @@ 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();
|
||||
|
||||
#define BOOL_DEFAULT_FLAG_TRUE_FALSE 0x1
|
||||
#define BOOL_DEFAULT_FALSE 0x0 /* false if property not present */
|
||||
#define BOOL_DEFAULT_TRUE 0x1 /* true if property not present */
|
||||
|
|
1
liblog/include_vndk/log/log_properties.h
Symbolic link
1
liblog/include_vndk/log/log_properties.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../include/log/log_properties.h
|
|
@ -39,4 +39,5 @@ LIBLOG_M {
|
|||
LIBLOG_O {
|
||||
global:
|
||||
__android_log_is_loggable_len;
|
||||
__android_log_is_debuggable; # vndk
|
||||
};
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <log/log_properties.h>
|
||||
#include <private/android_filesystem_config.h>
|
||||
#include <private/android_logger.h>
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio, const char* tag,
|
|||
return logLevel >= 0 && prio >= logLevel;
|
||||
}
|
||||
|
||||
LIBLOG_ABI_PRIVATE int __android_log_is_debuggable() {
|
||||
LIBLOG_ABI_PUBLIC int __android_log_is_debuggable() {
|
||||
static uint32_t serial;
|
||||
static struct cache_char tag_cache;
|
||||
static const char key[] = "ro.debuggable";
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <android-base/macros.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <log/log_event_list.h>
|
||||
#include <log/log_properties.h>
|
||||
#include <private/android_filesystem_config.h>
|
||||
#include <private/android_logger.h>
|
||||
|
||||
#include "LogTags.h"
|
||||
#include "LogUtils.h"
|
||||
|
|
Loading…
Reference in a new issue