Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5252169 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "liblog: __android_log_error_write in vndk" am: ae10af60

am: 685b39d5

Change-Id: I5051c6fefd3dfa391a84e938c918edb5a6b16f37
parents e19f4abd 685b39d5
Loading
Loading
Loading
Loading
+1 −25
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#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>
#include <log/uio.h> /* helper to define iovec for portability */
@@ -167,31 +168,6 @@ clockid_t android_log_clockid();

/* --------------------------------------------------------------------- */

#ifndef _ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE
#ifndef __ANDROID_API__
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 1
#elif __ANDROID_API__ > 22 /* > Lollipop */
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 1
#else
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 0
#endif
#endif

#if __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE

#define android_errorWriteLog(tag, subTag) \
  __android_log_error_write(tag, subTag, -1, NULL, 0)

#define android_errorWriteWithInfoLog(tag, subTag, uid, data, dataLen) \
  __android_log_error_write(tag, subTag, uid, data, dataLen)

int __android_log_error_write(int tag, const char* subTag, int32_t uid,
                              const char* data, uint32_t dataLen);

#endif /* __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE */

/* --------------------------------------------------------------------- */

#ifndef __ANDROID_USE_LIBLOG_CLOSE_INTERFACE
#ifndef __ANDROID_API__
#define __ANDROID_USE_LIBLOG_CLOSE_INTERFACE 1
+44 −0
Original line number Diff line number Diff line
/*
**
** 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_SAFETYNET_H
#define _LIBS_LOG_SAFETYNET_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE
#ifndef __ANDROID_API__
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 1
#elif __ANDROID_API__ > 22 /* > Lollipop */
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 1
#else
#define __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE 0
#endif
#endif

#if __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE

#define android_errorWriteLog(tag, subTag) \
  __android_log_error_write(tag, subTag, -1, NULL, 0)

#define android_errorWriteWithInfoLog(tag, subTag, uid, data, dataLen) \
  __android_log_error_write(tag, subTag, uid, data, dataLen)

int __android_log_error_write(int tag, const char* subTag, int32_t uid,
                              const char* data, uint32_t dataLen);

#endif /* __ANDROID_USE_LIBLOG_SAFETYNET_INTERFACE */

#ifdef __cplusplus
}
#endif

#endif /* _LIBS_LOG_SAFETYNET_H */
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include <log/log_main.h>
#include <log/log_radio.h>
#include <log/log_read.h>
#include <log/log_safetynet.h>
#include <log/log_time.h>

/*
+1 −0
Original line number Diff line number Diff line
../../include/log/log_safetynet.h
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ LIBLOG_M {
    android_logger_get_prune_list; # vndk
    android_logger_set_prune_list; # vndk
    android_logger_get_statistics; # vndk
    __android_log_error_write; # vndk
    __android_log_is_loggable;
};