Merge "Revert "liblog: remove mistakenly added symbols from vndk""

This commit is contained in:
Tom Cherry 2019-10-23 20:47:27 +00:00 committed by Gerrit Code Review
commit 9a3ebd2d54
8 changed files with 51 additions and 60 deletions

View File

@ -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.

View File

@ -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*/

View File

@ -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 @@ extern "C" {
/*
* 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 @@ int android_log_write_float32(android_log_context ctx, float value);
/* 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 */

View File

@ -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

View File

@ -0,0 +1 @@
../../include/log/log_id.h

View File

@ -0,0 +1 @@
../../include/log/log_properties.h

View File

@ -0,0 +1 @@
../../include/log/log_read.h

View File

@ -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 @@ typedef struct log_time {
uint32_t tv_sec;
uint32_t tv_nsec;
} __attribute__((__packed__)) log_time;
#endif
#endif /* _LIBS_LOG_LOG_TIME_H */

View File

@ -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 {
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_M {
LIBLOG_O {
global:
__android_log_is_loggable_len;
__android_log_is_debuggable; # vndk
};
LIBLOG_Q {
@ -48,24 +61,21 @@ LIBLOG_Q {
__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;