diff options
author | Greg Hackmann <ghackmann@google.com> | 2013-12-17 18:10:32 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-12-17 18:10:33 +0000 |
commit | 9f4e67c50b5c311adeaaf6135ef79214a46d0e26 (patch) | |
tree | 572377f468a639a1f94c4d3c9b862f842f4eb26e /services | |
parent | f431daa22811fdce9c4ec975d5d33121898b4f9b (diff) | |
parent | 32b4c0779ea3a0149b31a1340513e9e0a6897b5f (diff) | |
download | frameworks_base-9f4e67c50b5c311adeaaf6135ef79214a46d0e26.zip frameworks_base-9f4e67c50b5c311adeaaf6135ef79214a46d0e26.tar.gz frameworks_base-9f4e67c50b5c311adeaaf6135ef79214a46d0e26.tar.bz2 |
Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
Diffstat (limited to 'services')
-rw-r--r-- | services/jni/com_android_server_AlarmManagerService.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/services/jni/com_android_server_AlarmManagerService.cpp b/services/jni/com_android_server_AlarmManagerService.cpp index c2f6151..8da143d 100644 --- a/services/jni/com_android_server_AlarmManagerService.cpp +++ b/services/jni/com_android_server_AlarmManagerService.cpp @@ -37,7 +37,7 @@ namespace android { -static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jobject obj, jint fd, jint minswest) +static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv*, jobject, jint, jint minswest) { struct timezone tz; @@ -55,40 +55,40 @@ static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jo return 0; } -static jint android_server_AlarmManagerService_init(JNIEnv* env, jobject obj) +static jint android_server_AlarmManagerService_init(JNIEnv*, jobject) { return open("/dev/alarm", O_RDWR); } -static void android_server_AlarmManagerService_close(JNIEnv* env, jobject obj, jint fd) +static void android_server_AlarmManagerService_close(JNIEnv*, jobject, jint fd) { - close(fd); + close(fd); } -static void android_server_AlarmManagerService_set(JNIEnv* env, jobject obj, jint fd, jint type, jlong seconds, jlong nanoseconds) +static void android_server_AlarmManagerService_set(JNIEnv*, jobject, jint fd, jint type, jlong seconds, jlong nanoseconds) { struct timespec ts; ts.tv_sec = seconds; ts.tv_nsec = nanoseconds; - int result = ioctl(fd, ANDROID_ALARM_SET(type), &ts); - if (result < 0) - { + int result = ioctl(fd, ANDROID_ALARM_SET(type), &ts); + if (result < 0) + { ALOGE("Unable to set alarm to %lld.%09lld: %s\n", seconds, nanoseconds, strerror(errno)); } } -static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject obj, jint fd) +static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv*, jobject, jint fd) { - int result = 0; + int result = 0; - do - { - result = ioctl(fd, ANDROID_ALARM_WAIT); - } while (result < 0 && errno == EINTR); + do + { + result = ioctl(fd, ANDROID_ALARM_WAIT); + } while (result < 0 && errno == EINTR); - if (result < 0) - { + if (result < 0) + { ALOGE("Unable to wait on alarm: %s\n", strerror(errno)); return 0; } @@ -98,9 +98,9 @@ static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject static JNINativeMethod sMethods[] = { /* name, signature, funcPtr */ - {"init", "()I", (void*)android_server_AlarmManagerService_init}, - {"close", "(I)V", (void*)android_server_AlarmManagerService_close}, - {"set", "(IIJJ)V", (void*)android_server_AlarmManagerService_set}, + {"init", "()I", (void*)android_server_AlarmManagerService_init}, + {"close", "(I)V", (void*)android_server_AlarmManagerService_close}, + {"set", "(IIJJ)V", (void*)android_server_AlarmManagerService_set}, {"waitForAlarm", "(I)I", (void*)android_server_AlarmManagerService_waitForAlarm}, {"setKernelTimezone", "(II)I", (void*)android_server_AlarmManagerService_setKernelTimezone}, }; |