summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-02-16 10:13:53 -0800
committerKenny Root <kroot@google.com>2011-02-16 10:56:32 -0800
commitbb9d394b21bdfeb1ceb4cf6e4ed0306e39757b15 (patch)
treedbe7d5b2eef96e80ed4a3a1595e1a26cb19e228d /services/jni
parent9497144281b92dd5293ea734d668217bcf4e86e9 (diff)
downloadframeworks_base-bb9d394b21bdfeb1ceb4cf6e4ed0306e39757b15.zip
frameworks_base-bb9d394b21bdfeb1ceb4cf6e4ed0306e39757b15.tar.gz
frameworks_base-bb9d394b21bdfeb1ceb4cf6e4ed0306e39757b15.tar.bz2
Clean up use of HAVE_ANDROID_OS
HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0" for non-targets. Changing them to #ifdef should be safe and matches all the other uses of HAVE_ANDROID_OS throughout the system. Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
Diffstat (limited to 'services/jni')
-rw-r--r--services/jni/com_android_server_AlarmManagerService.cpp12
-rw-r--r--services/jni/com_android_server_BatteryService.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/services/jni/com_android_server_AlarmManagerService.cpp b/services/jni/com_android_server_AlarmManagerService.cpp
index 0e162bd..aa8c9b3 100644
--- a/services/jni/com_android_server_AlarmManagerService.cpp
+++ b/services/jni/com_android_server_AlarmManagerService.cpp
@@ -33,7 +33,7 @@
#include <errno.h>
#include <unistd.h>
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
#include <linux/ioctl.h>
#include <linux/android_alarm.h>
#endif
@@ -42,7 +42,7 @@ namespace android {
static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jobject obj, jint fd, jint minswest)
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
struct timezone tz;
tz.tz_minuteswest = minswest;
@@ -64,7 +64,7 @@ static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jo
static jint android_server_AlarmManagerService_init(JNIEnv* env, jobject obj)
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
return open("/dev/alarm", O_RDWR);
#else
return -1;
@@ -73,14 +73,14 @@ static jint android_server_AlarmManagerService_init(JNIEnv* env, jobject obj)
static void android_server_AlarmManagerService_close(JNIEnv* env, jobject obj, jint fd)
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
close(fd);
#endif
}
static void android_server_AlarmManagerService_set(JNIEnv* env, jobject obj, jint fd, jint type, jlong seconds, jlong nanoseconds)
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
struct timespec ts;
ts.tv_sec = seconds;
ts.tv_nsec = nanoseconds;
@@ -95,7 +95,7 @@ static void android_server_AlarmManagerService_set(JNIEnv* env, jobject obj, jin
static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject obj, jint fd)
{
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
int result = 0;
do
diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp
index d4513e9..98d0d92 100644
--- a/services/jni/com_android_server_BatteryService.cpp
+++ b/services/jni/com_android_server_BatteryService.cpp
@@ -33,7 +33,7 @@
#include <unistd.h>
#include <dirent.h>
-#if HAVE_ANDROID_OS
+#ifdef HAVE_ANDROID_OS
#include <linux/ioctl.h>
#endif