summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-07-13 11:06:57 -0400
committerMike Lockwood <lockwood@android.com>2011-07-13 19:45:44 -0400
commitc1b9bbb21c8ad5109978a4e9e770cd18b0257434 (patch)
treebfb7dd2272e5fe29d3c0fc4f22ca708e00bc10be /services/jni
parentb6e5e7a740bf595a1a5d32b28549e5d579a04ee3 (diff)
downloadframeworks_base-c1b9bbb21c8ad5109978a4e9e770cd18b0257434.zip
frameworks_base-c1b9bbb21c8ad5109978a4e9e770cd18b0257434.tar.gz
frameworks_base-c1b9bbb21c8ad5109978a4e9e770cd18b0257434.tar.bz2
Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build
Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services/jni')
-rw-r--r--services/jni/com_android_server_AlarmManagerService.cpp17
-rw-r--r--services/jni/com_android_server_BatteryService.cpp3
2 files changed, 0 insertions, 20 deletions
diff --git a/services/jni/com_android_server_AlarmManagerService.cpp b/services/jni/com_android_server_AlarmManagerService.cpp
index c9a702a..e80dd04 100644
--- a/services/jni/com_android_server_AlarmManagerService.cpp
+++ b/services/jni/com_android_server_AlarmManagerService.cpp
@@ -32,17 +32,13 @@
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
-
-#ifdef HAVE_ANDROID_OS
#include <linux/ioctl.h>
#include <linux/android_alarm.h>
-#endif
namespace android {
static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jobject obj, jint fd, jint minswest)
{
-#ifdef HAVE_ANDROID_OS
struct timezone tz;
tz.tz_minuteswest = minswest;
@@ -57,30 +53,20 @@ static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jo
}
return 0;
-#else
- return -ENOSYS;
-#endif
}
static jint android_server_AlarmManagerService_init(JNIEnv* env, jobject obj)
{
-#ifdef HAVE_ANDROID_OS
return open("/dev/alarm", O_RDWR);
-#else
- return -1;
-#endif
}
static void android_server_AlarmManagerService_close(JNIEnv* env, jobject obj, jint fd)
{
-#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)
{
-#ifdef HAVE_ANDROID_OS
struct timespec ts;
ts.tv_sec = seconds;
ts.tv_nsec = nanoseconds;
@@ -90,12 +76,10 @@ static void android_server_AlarmManagerService_set(JNIEnv* env, jobject obj, jin
{
LOGE("Unable to set alarm to %lld.%09lld: %s\n", seconds, nanoseconds, strerror(errno));
}
-#endif
}
static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject obj, jint fd)
{
-#ifdef HAVE_ANDROID_OS
int result = 0;
do
@@ -110,7 +94,6 @@ static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject
}
return result;
-#endif
}
static JNINativeMethod sMethods[] = {
diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp
index 98d0d92..b9f2c1f 100644
--- a/services/jni/com_android_server_BatteryService.cpp
+++ b/services/jni/com_android_server_BatteryService.cpp
@@ -32,10 +32,7 @@
#include <errno.h>
#include <unistd.h>
#include <dirent.h>
-
-#ifdef HAVE_ANDROID_OS
#include <linux/ioctl.h>
-#endif
namespace android {