The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | #include "JNIHelp.h" |
| 2 | #include "jni.h" |
| 3 | #include "utils/Log.h" |
| 4 | #include "utils/misc.h" |
| 5 | |
| 6 | namespace android { |
| 7 | int register_android_server_AlarmManagerService(JNIEnv* env); |
| 8 | int register_android_server_BatteryService(JNIEnv* env); |
| 9 | int register_android_server_KeyInputQueue(JNIEnv* env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 10 | int register_android_server_InputManager(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 11 | int register_android_server_LightsService(JNIEnv* env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 12 | int register_android_server_SensorService(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 13 | int register_android_server_VibratorService(JNIEnv* env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 14 | int register_android_server_SystemServer(JNIEnv* env); |
Mike Lockwood | 00b7427 | 2010-03-26 10:41:48 -0400 | [diff] [blame] | 15 | int register_android_server_location_GpsLocationProvider(JNIEnv* env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 16 | }; |
| 17 | |
| 18 | using namespace android; |
| 19 | |
| 20 | extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) |
| 21 | { |
| 22 | JNIEnv* env = NULL; |
| 23 | jint result = -1; |
| 24 | |
| 25 | if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { |
| 26 | LOGE("GetEnv failed!"); |
| 27 | return result; |
| 28 | } |
| 29 | LOG_ASSERT(env, "Could not retrieve the env!"); |
| 30 | |
| 31 | register_android_server_KeyInputQueue(env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 32 | register_android_server_InputManager(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 33 | register_android_server_LightsService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | register_android_server_AlarmManagerService(env); |
| 35 | register_android_server_BatteryService(env); |
| 36 | register_android_server_SensorService(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 37 | register_android_server_VibratorService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 38 | register_android_server_SystemServer(env); |
Mike Lockwood | 00b7427 | 2010-03-26 10:41:48 -0400 | [diff] [blame] | 39 | register_android_server_location_GpsLocationProvider(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | |
| 41 | return JNI_VERSION_1_4; |
| 42 | } |