diff options
-rw-r--r-- | adb/daemon/main.cpp | 2 | ||||
-rw-r--r-- | adb/services.cpp | 2 | ||||
-rw-r--r-- | adb/set_verity_enable_state_service.cpp | 2 | ||||
-rw-r--r-- | adb/sockets.cpp | 2 | ||||
-rw-r--r-- | fs_mgr/fs_mgr.cpp | 2 | ||||
-rw-r--r-- | libcutils/Android.bp | 5 | ||||
-rw-r--r-- | libcutils/sched_policy.cpp | 7 | ||||
-rw-r--r-- | libcutils/trace-dev.c | 3 | ||||
-rw-r--r-- | liblog/event_tag_map.cpp | 1 | ||||
-rw-r--r-- | liblog/include/log/log_properties.h | 35 | ||||
-rw-r--r-- | liblog/include/private/android_logger.h | 2 | ||||
l--------- | liblog/include_vndk/log/log_properties.h | 1 | ||||
-rw-r--r-- | liblog/liblog.map.txt | 1 | ||||
-rw-r--r-- | liblog/pmsg_writer.c | 1 | ||||
-rw-r--r-- | liblog/properties.c | 2 | ||||
-rw-r--r-- | logd/LogTags.cpp | 2 |
16 files changed, 59 insertions, 11 deletions
diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp index 7da94ce10..7a87df461 100644 --- a/adb/daemon/main.cpp +++ b/adb/daemon/main.cpp | |||
@@ -32,10 +32,10 @@ | |||
32 | #include <android-base/properties.h> | 32 | #include <android-base/properties.h> |
33 | #include <android-base/stringprintf.h> | 33 | #include <android-base/stringprintf.h> |
34 | #include <libminijail.h> | 34 | #include <libminijail.h> |
35 | #include <log/log_properties.h> | ||
35 | #include <scoped_minijail.h> | 36 | #include <scoped_minijail.h> |
36 | 37 | ||
37 | #include <private/android_filesystem_config.h> | 38 | #include <private/android_filesystem_config.h> |
38 | #include <private/android_logger.h> | ||
39 | #include "debuggerd/handler.h" | 39 | #include "debuggerd/handler.h" |
40 | #include "selinux/android.h" | 40 | #include "selinux/android.h" |
41 | 41 | ||
diff --git a/adb/services.cpp b/adb/services.cpp index f764c52cc..432704451 100644 --- a/adb/services.cpp +++ b/adb/services.cpp | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <android-base/properties.h> | 43 | #include <android-base/properties.h> |
44 | #include <bootloader_message/bootloader_message.h> | 44 | #include <bootloader_message/bootloader_message.h> |
45 | #include <cutils/android_reboot.h> | 45 | #include <cutils/android_reboot.h> |
46 | #include <private/android_logger.h> | 46 | #include <log/log_properties.h> |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #include "adb.h" | 49 | #include "adb.h" |
diff --git a/adb/set_verity_enable_state_service.cpp b/adb/set_verity_enable_state_service.cpp index 76b156d66..d4dd25636 100644 --- a/adb/set_verity_enable_state_service.cpp +++ b/adb/set_verity_enable_state_service.cpp | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include "android-base/properties.h" | 27 | #include "android-base/properties.h" |
28 | #include "android-base/stringprintf.h" | 28 | #include "android-base/stringprintf.h" |
29 | #include <private/android_logger.h> | 29 | #include <log/log_properties.h> |
30 | 30 | ||
31 | #include "adb.h" | 31 | #include "adb.h" |
32 | #include "adb_io.h" | 32 | #include "adb_io.h" |
diff --git a/adb/sockets.cpp b/adb/sockets.cpp index c05903f9e..59a48f56d 100644 --- a/adb/sockets.cpp +++ b/adb/sockets.cpp | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #if !ADB_HOST | 33 | #if !ADB_HOST |
34 | #include <android-base/properties.h> | 34 | #include <android-base/properties.h> |
35 | #include <private/android_logger.h> | 35 | #include <log/log_properties.h> |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #include "adb.h" | 38 | #include "adb.h" |
diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index e635e531e..4ddcc52b2 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp | |||
@@ -48,8 +48,8 @@ | |||
48 | #include <linux/fs.h> | 48 | #include <linux/fs.h> |
49 | #include <linux/loop.h> | 49 | #include <linux/loop.h> |
50 | #include <linux/magic.h> | 50 | #include <linux/magic.h> |
51 | #include <log/log_properties.h> | ||
51 | #include <logwrap/logwrap.h> | 52 | #include <logwrap/logwrap.h> |
52 | #include <private/android_logger.h> // for __android_log_is_debuggable() | ||
53 | 53 | ||
54 | #include "fs_mgr.h" | 54 | #include "fs_mgr.h" |
55 | #include "fs_mgr_avb.h" | 55 | #include "fs_mgr_avb.h" |
diff --git a/libcutils/Android.bp b/libcutils/Android.bp index bb82f4da3..0a3bab744 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp | |||
@@ -143,7 +143,10 @@ cc_library { | |||
143 | }, | 143 | }, |
144 | 144 | ||
145 | shared_libs: ["liblog"], | 145 | shared_libs: ["liblog"], |
146 | header_libs: ["libcutils_headers"], | 146 | header_libs: [ |
147 | "libcutils_headers", | ||
148 | "libutils_headers", | ||
149 | ], | ||
147 | export_header_lib_headers: ["libcutils_headers"], | 150 | export_header_lib_headers: ["libcutils_headers"], |
148 | 151 | ||
149 | cflags: [ | 152 | cflags: [ |
diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp index a9c061efb..4a0b03526 100644 --- a/libcutils/sched_policy.cpp +++ b/libcutils/sched_policy.cpp | |||
@@ -28,6 +28,13 @@ | |||
28 | 28 | ||
29 | #define UNUSED __attribute__((__unused__)) | 29 | #define UNUSED __attribute__((__unused__)) |
30 | 30 | ||
31 | #ifndef SLOGE | ||
32 | #define SLOGE ALOGE | ||
33 | #endif | ||
34 | #ifndef SLOGW | ||
35 | #define SLOGW ALOGW | ||
36 | #endif | ||
37 | |||
31 | /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. | 38 | /* Re-map SP_DEFAULT to the system default policy, and leave other values unchanged. |
32 | * Call this any place a SchedPolicy is used as an input parameter. | 39 | * Call this any place a SchedPolicy is used as an input parameter. |
33 | * Returns the possibly re-mapped policy. | 40 | * Returns the possibly re-mapped policy. |
diff --git a/libcutils/trace-dev.c b/libcutils/trace-dev.c index 113f423cb..d45e5a98e 100644 --- a/libcutils/trace-dev.c +++ b/libcutils/trace-dev.c | |||
@@ -29,7 +29,8 @@ | |||
29 | #include <cutils/compiler.h> | 29 | #include <cutils/compiler.h> |
30 | #include <cutils/properties.h> | 30 | #include <cutils/properties.h> |
31 | #include <cutils/trace.h> | 31 | #include <cutils/trace.h> |
32 | #include <private/android_logger.h> | 32 | #include <log/log.h> |
33 | #include <log/log_properties.h> | ||
33 | 34 | ||
34 | /** | 35 | /** |
35 | * Maximum size of a message that can be logged to the trace buffer. | 36 | * Maximum size of a message that can be logged to the trace buffer. |
diff --git a/liblog/event_tag_map.cpp b/liblog/event_tag_map.cpp index 73ed16f33..5fc7e3516 100644 --- a/liblog/event_tag_map.cpp +++ b/liblog/event_tag_map.cpp | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <unordered_map> | 31 | #include <unordered_map> |
32 | 32 | ||
33 | #include <log/event_tag_map.h> | 33 | #include <log/event_tag_map.h> |
34 | #include <log/log_properties.h> | ||
34 | #include <private/android_logger.h> | 35 | #include <private/android_logger.h> |
35 | #include <utils/FastStrcmp.h> | 36 | #include <utils/FastStrcmp.h> |
36 | #include <utils/RWLock.h> | 37 | #include <utils/RWLock.h> |
diff --git a/liblog/include/log/log_properties.h b/liblog/include/log/log_properties.h new file mode 100644 index 000000000..7d398a6b4 --- /dev/null +++ b/liblog/include/log/log_properties.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | ** | ||
3 | ** Copyright 2017, The Android Open Source Project | ||
4 | ** | ||
5 | ** This file is dual licensed. It may be redistributed and/or modified | ||
6 | ** under the terms of the Apache 2.0 License OR version 2 of the GNU | ||
7 | ** General Public License. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LIBS_LOG_PROPERTIES_H | ||
11 | #define _LIBS_LOG_PROPERTIES_H | ||
12 | |||
13 | #ifdef __cplusplus | ||
14 | extern "C" { | ||
15 | #endif | ||
16 | |||
17 | #ifndef __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE | ||
18 | #ifndef __ANDROID_API__ | ||
19 | #define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 1 | ||
20 | #elif __ANDROID_API__ > 24 /* > Nougat */ | ||
21 | #define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 1 | ||
22 | #else | ||
23 | #define __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE 0 | ||
24 | #endif | ||
25 | #endif | ||
26 | |||
27 | #if __ANDROID_USE_LIBLOG_IS_DEBUGGABLE_INTERFACE | ||
28 | int __android_log_is_debuggable(); | ||
29 | #endif | ||
30 | |||
31 | #ifdef __cplusplus | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #endif /* _LIBS_LOG_PROPERTIES_H */ | ||
diff --git a/liblog/include/private/android_logger.h b/liblog/include/private/android_logger.h index e3ccfcff2..965de375c 100644 --- a/liblog/include/private/android_logger.h +++ b/liblog/include/private/android_logger.h | |||
@@ -135,8 +135,6 @@ int __android_log_security_bwrite(int32_t tag, const void* payload, size_t len); | |||
135 | int __android_log_security_bswrite(int32_t tag, const char* payload); | 135 | int __android_log_security_bswrite(int32_t tag, const char* payload); |
136 | int __android_log_security(); /* Device Owner is present */ | 136 | int __android_log_security(); /* Device Owner is present */ |
137 | 137 | ||
138 | int __android_log_is_debuggable(); | ||
139 | |||
140 | #define BOOL_DEFAULT_FLAG_TRUE_FALSE 0x1 | 138 | #define BOOL_DEFAULT_FLAG_TRUE_FALSE 0x1 |
141 | #define BOOL_DEFAULT_FALSE 0x0 /* false if property not present */ | 139 | #define BOOL_DEFAULT_FALSE 0x0 /* false if property not present */ |
142 | #define BOOL_DEFAULT_TRUE 0x1 /* true if property not present */ | 140 | #define BOOL_DEFAULT_TRUE 0x1 /* true if property not present */ |
diff --git a/liblog/include_vndk/log/log_properties.h b/liblog/include_vndk/log/log_properties.h new file mode 120000 index 000000000..bbec42614 --- /dev/null +++ b/liblog/include_vndk/log/log_properties.h | |||
@@ -0,0 +1 @@ | |||
../../include/log/log_properties.h \ No newline at end of file | |||
diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt index c00f2a08b..58fb1486f 100644 --- a/liblog/liblog.map.txt +++ b/liblog/liblog.map.txt | |||
@@ -39,4 +39,5 @@ LIBLOG_M { | |||
39 | LIBLOG_O { | 39 | LIBLOG_O { |
40 | global: | 40 | global: |
41 | __android_log_is_loggable_len; | 41 | __android_log_is_loggable_len; |
42 | __android_log_is_debuggable; # vndk | ||
42 | }; | 43 | }; |
diff --git a/liblog/pmsg_writer.c b/liblog/pmsg_writer.c index e71c176aa..dc428567f 100644 --- a/liblog/pmsg_writer.c +++ b/liblog/pmsg_writer.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
27 | #include <time.h> | 27 | #include <time.h> |
28 | 28 | ||
29 | #include <log/log_properties.h> | ||
29 | #include <private/android_filesystem_config.h> | 30 | #include <private/android_filesystem_config.h> |
30 | #include <private/android_logger.h> | 31 | #include <private/android_logger.h> |
31 | 32 | ||
diff --git a/liblog/properties.c b/liblog/properties.c index adf19002e..c71cbcfc1 100644 --- a/liblog/properties.c +++ b/liblog/properties.c | |||
@@ -277,7 +277,7 @@ LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio, const char* tag, | |||
277 | return logLevel >= 0 && prio >= logLevel; | 277 | return logLevel >= 0 && prio >= logLevel; |
278 | } | 278 | } |
279 | 279 | ||
280 | LIBLOG_ABI_PRIVATE int __android_log_is_debuggable() { | 280 | LIBLOG_ABI_PUBLIC int __android_log_is_debuggable() { |
281 | static uint32_t serial; | 281 | static uint32_t serial; |
282 | static struct cache_char tag_cache; | 282 | static struct cache_char tag_cache; |
283 | static const char key[] = "ro.debuggable"; | 283 | static const char key[] = "ro.debuggable"; |
diff --git a/logd/LogTags.cpp b/logd/LogTags.cpp index 67649b1e7..fcd45bd2b 100644 --- a/logd/LogTags.cpp +++ b/logd/LogTags.cpp | |||
@@ -32,8 +32,8 @@ | |||
32 | #include <android-base/macros.h> | 32 | #include <android-base/macros.h> |
33 | #include <android-base/stringprintf.h> | 33 | #include <android-base/stringprintf.h> |
34 | #include <log/log_event_list.h> | 34 | #include <log/log_event_list.h> |
35 | #include <log/log_properties.h> | ||
35 | #include <private/android_filesystem_config.h> | 36 | #include <private/android_filesystem_config.h> |
36 | #include <private/android_logger.h> | ||
37 | 37 | ||
38 | #include "LogTags.h" | 38 | #include "LogTags.h" |
39 | #include "LogUtils.h" | 39 | #include "LogUtils.h" |