diff options
author | Greg Hackmann <ghackmann@google.com> | 2013-12-17 18:24:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-17 18:24:40 +0000 |
commit | 2f735d8dc85fba0fcd1ac3df85d4430564ba2848 (patch) | |
tree | 1cf6b3d3bd8806259182aec5c01d19c5aededd88 /services | |
parent | 7fa0bde6824c18d6c9a65ce3ce3ba0ba704b7a54 (diff) | |
parent | 552eba80ef8f48204e77129dd99581d8f0ac3831 (diff) | |
download | frameworks_base-2f735d8dc85fba0fcd1ac3df85d4430564ba2848.zip frameworks_base-2f735d8dc85fba0fcd1ac3df85d4430564ba2848.tar.gz frameworks_base-2f735d8dc85fba0fcd1ac3df85d4430564ba2848.tar.bz2 |
am 552eba80: am 153ec6ca: am 3545433d: am 9f4e67c5: Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
* commit '552eba80ef8f48204e77129dd99581d8f0ac3831':
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}, }; |