ART: Use __ANDROID__ instead of HAVE_ANDROID_OS
Use the proper define.
Change-Id: I71e291ac25f5d5f0187ac9b6ef2d6872f19e6085
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index 859de4b..7a620e3 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -26,7 +26,7 @@
#include "utils.h"
// Headers for LogMessage::LogLine.
-#ifdef HAVE_ANDROID_OS
+#ifdef __ANDROID__
#include "cutils/log.h"
#else
#include <sys/types.h>
@@ -47,7 +47,7 @@
// Print INTERNAL_FATAL messages directly instead of at destruction time. This only works on the
// host right now: for the device, a stream buf collating output into lines and calling LogLine or
// lower-level logging is necessary.
-#ifdef HAVE_ANDROID_OS
+#ifdef __ANDROID__
static constexpr bool kPrintInternalFatalDirectly = false;
#else
static constexpr bool kPrintInternalFatalDirectly = !kIsTargetBuild;
@@ -234,7 +234,7 @@
return data_->GetBuffer();
}
-#ifdef HAVE_ANDROID_OS
+#ifdef __ANDROID__
static const android_LogPriority kLogSeverityToAndroidLogPriority[] = {
ANDROID_LOG_VERBOSE, ANDROID_LOG_DEBUG, ANDROID_LOG_INFO, ANDROID_LOG_WARN,
ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, ANDROID_LOG_FATAL
@@ -245,7 +245,7 @@
void LogMessage::LogLine(const char* file, unsigned int line, LogSeverity log_severity,
const char* message) {
-#ifdef HAVE_ANDROID_OS
+#ifdef __ANDROID__
const char* tag = ProgramInvocationShortName();
int priority = kLogSeverityToAndroidLogPriority[log_severity];
if (priority == ANDROID_LOG_FATAL) {
@@ -264,7 +264,7 @@
void LogMessage::LogLineLowStack(const char* file, unsigned int line, LogSeverity log_severity,
const char* message) {
-#ifdef HAVE_ANDROID_OS
+#ifdef __ANDROID__
// Use android_writeLog() to avoid stack-based buffers used by android_printLog().
const char* tag = ProgramInvocationShortName();
int priority = kLogSeverityToAndroidLogPriority[log_severity];