Merge "Revert "liblog: remove mistakenly added symbols from vndk"" am: 9a3ebd2d54 am: 2b19109d2c
am: a11cc3fb45
Change-Id: I6eaf1c19de7ab9a993f50b3308c0e7b6e3796b6a
diff --git a/libcutils/trace-dev.inc b/libcutils/trace-dev.inc
index fc7a870..e3da77b 100644
--- a/libcutils/trace-dev.inc
+++ b/libcutils/trace-dev.inc
@@ -32,6 +32,7 @@
#include <cutils/properties.h>
#include <cutils/trace.h>
#include <log/log.h>
+#include <log/log_properties.h>
/**
* Maximum size of a message that can be logged to the trace buffer.
diff --git a/liblog/include_vndk/log/log.h b/liblog/include_vndk/log/log.h
index 393b480..a79beec 100644
--- a/liblog/include_vndk/log/log.h
+++ b/liblog/include_vndk/log/log.h
@@ -1,11 +1,13 @@
/*Special log.h file for VNDK linking modules*/
-#pragma once
+#ifndef _LIBS_LOG_LOG_H
+#define _LIBS_LOG_LOG_H
#include <android/log.h>
#include <log/log_id.h>
#include <log/log_main.h>
#include <log/log_radio.h>
+#include <log/log_read.h>
#include <log/log_safetynet.h>
#include <log/log_system.h>
#include <log/log_time.h>
@@ -20,16 +22,4 @@
#define LOG_TAG NULL
#endif
-// Legacy dependencies...
-/* deal with possible sys/cdefs.h conflict with fcntl.h */
-#ifdef __unused
-#define __unused_defined __unused
-#undef __unused
-#endif
-
-#include <fcntl.h> /* Pick up O_* macros */
-
-/* restore definitions from above */
-#ifdef __unused_defined
-#define __unused __attribute__((__unused__))
-#endif
+#endif /*_LIBS_LOG_LOG_H*/
diff --git a/liblog/include_vndk/log/log_event_list.h b/liblog/include_vndk/log/log_event_list.h
index 81c879f..1f3dd37 100644
--- a/liblog/include_vndk/log/log_event_list.h
+++ b/liblog/include_vndk/log/log_event_list.h
@@ -16,7 +16,8 @@
/* Special log_event_list.h file for VNDK linking modules */
-#pragma once
+#ifndef _LIBS_LOG_EVENT_LIST_H
+#define _LIBS_LOG_EVENT_LIST_H
#include <stdint.h>
@@ -29,7 +30,10 @@
/*
* The opaque context used to manipulate lists of events.
*/
+#ifndef __android_log_context_defined
+#define __android_log_context_defined
typedef struct android_log_context_internal* android_log_context;
+#endif
/*
* Creates a context associated with an event tag to write elements to
@@ -57,9 +61,18 @@
/* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */
int android_log_write_list(android_log_context ctx, log_id_t id);
+/* Reset writer context */
+int android_log_reset(android_log_context ctx);
+
+/* Reset reader context */
+int android_log_parser_reset(android_log_context ctx,
+ const char* msg, size_t len);
+
/* Finished with reader or writer context */
int android_log_destroy(android_log_context* ctx);
#ifdef __cplusplus
}
#endif
+
+#endif /* _LIBS_LOG_EVENT_LIST_H */
diff --git a/liblog/include_vndk/log/log_id.h b/liblog/include_vndk/log/log_id.h
deleted file mode 100644
index 3c6df8b..0000000
--- a/liblog/include_vndk/log/log_id.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2005-2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <android/log.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Send a simple string to the log.
- */
-int __android_log_buf_write(int bufID, int prio, const char* tag, const char* text);
-int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fmt, ...)
- __attribute__((__format__(printf, 4, 5)));
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/liblog/include_vndk/log/log_id.h b/liblog/include_vndk/log/log_id.h
new file mode 120000
index 0000000..dce92b9
--- /dev/null
+++ b/liblog/include_vndk/log/log_id.h
@@ -0,0 +1 @@
+../../include/log/log_id.h
\ No newline at end of file
diff --git a/liblog/include_vndk/log/log_properties.h b/liblog/include_vndk/log/log_properties.h
new file mode 120000
index 0000000..bbec426
--- /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/include_vndk/log/log_read.h b/liblog/include_vndk/log/log_read.h
new file mode 120000
index 0000000..01de8b9
--- /dev/null
+++ b/liblog/include_vndk/log/log_read.h
@@ -0,0 +1 @@
+../../include/log/log_read.h
\ No newline at end of file
diff --git a/liblog/include_vndk/log/log_time.h b/liblog/include_vndk/log/log_time.h
index 014af08..5a09959 100644
--- a/liblog/include_vndk/log/log_time.h
+++ b/liblog/include_vndk/log/log_time.h
@@ -14,7 +14,8 @@
* limitations under the License.
*/
-#pragma once
+#ifndef _LIBS_LOG_LOG_TIME_H
+#define _LIBS_LOG_LOG_TIME_H
#include <stdint.h>
@@ -29,6 +30,9 @@
#define MS_PER_SEC 1000ULL
#endif
+#ifndef __struct_log_time_defined
+#define __struct_log_time_defined
+
#define LOG_TIME_SEC(t) ((t)->tv_sec)
/* next power of two after NS_PER_SEC */
#define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2))
@@ -37,3 +41,7 @@
uint32_t tv_sec;
uint32_t tv_nsec;
} __attribute__((__packed__)) log_time;
+
+#endif
+
+#endif /* _LIBS_LOG_LOG_TIME_H */
diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt
index ece8b75..ce4c53c 100644
--- a/liblog/liblog.map.txt
+++ b/liblog/liblog.map.txt
@@ -1,5 +1,7 @@
LIBLOG {
global:
+ android_name_to_log_id; # vndk
+ android_log_id_to_name; # vndk
__android_log_assert;
__android_log_buf_print;
__android_log_buf_write;
@@ -12,15 +14,25 @@
LIBLOG_L {
global:
- android_logger_list_alloc; # apex
- android_logger_list_alloc_time; # apex
- android_logger_list_free; # apex
- android_logger_list_read; # apex
- android_logger_open; # apex
+ android_logger_clear; # vndk
+ android_logger_get_id; # vndk
+ android_logger_get_log_readable_size; # vndk
+ android_logger_get_log_version; # vndk
+ android_logger_get_log_size; # vndk
+ android_logger_list_alloc; # apex vndk
+ android_logger_list_alloc_time; # apex vndk
+ android_logger_list_free; # apex vndk
+ android_logger_list_open; # vndk
+ android_logger_list_read; # apex vndk
+ android_logger_open; # apex vndk
+ android_logger_set_log_size; # vndk
};
LIBLOG_M {
global:
+ android_logger_get_prune_list; # vndk
+ android_logger_set_prune_list; # vndk
+ android_logger_get_statistics; # vndk
__android_log_error_write; # apex vndk
__android_log_is_loggable;
create_android_logger; # apex vndk
@@ -39,6 +51,7 @@
LIBLOG_O {
global:
__android_log_is_loggable_len;
+ __android_log_is_debuggable; # vndk
};
LIBLOG_Q {
@@ -48,24 +61,21 @@
__android_log_bwrite; # apex
__android_log_close; # apex
__android_log_security; # apex
+ android_log_reset; #vndk
+ android_log_parser_reset; #vndk
};
LIBLOG_PRIVATE {
global:
- __android_log_is_debuggable;
__android_log_pmsg_file_read;
__android_log_pmsg_file_write;
__android_log_security_bswrite;
__android_logger_get_buffer_size;
__android_logger_property_get_bool;
- android_name_to_log_id;
android_openEventTagMap;
- android_logger_list_open;
- android_log_id_to_name;
android_log_processBinaryLogBuffer;
android_log_processLogBuffer;
android_log_read_next;
- android_log_reset;
android_log_write_list_buffer;
android_lookupEventTagNum;
create_android_log_parser;