James Dong | 199d1c1 | 2011-03-17 11:48:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 17 | #include "JNIHelp.h" |
| 18 | #include "jni.h" |
| 19 | #include "utils/Log.h" |
| 20 | #include "utils/misc.h" |
| 21 | |
| 22 | namespace android { |
| 23 | int register_android_server_AlarmManagerService(JNIEnv* env); |
Jinsuk Kim | 4f512fb | 2014-02-28 17:41:17 +0900 | [diff] [blame] | 24 | int register_android_server_AssetAtlasService(JNIEnv* env); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 25 | int register_android_server_BatteryStatsService(JNIEnv* env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 26 | int register_android_server_ConsumerIrService(JNIEnv *env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 27 | int register_android_server_InputApplicationHandle(JNIEnv* env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 28 | int register_android_server_InputWindowHandle(JNIEnv* env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 29 | int register_android_server_InputManager(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 30 | int register_android_server_LightsService(JNIEnv* env); |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 31 | int register_android_server_PowerManagerService(JNIEnv* env); |
Mike Lockwood | b01e8bf | 2011-08-29 20:11:07 -0400 | [diff] [blame] | 32 | int register_android_server_SerialService(JNIEnv* env); |
Jinsuk Kim | 4f512fb | 2014-02-28 17:41:17 +0900 | [diff] [blame] | 33 | int register_android_server_SystemServer(JNIEnv* env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 34 | int register_android_server_UsbDeviceManager(JNIEnv* env); |
| 35 | int register_android_server_UsbHostManager(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 36 | int register_android_server_VibratorService(JNIEnv* env); |
Mike Lockwood | 00b7427 | 2010-03-26 10:41:48 -0400 | [diff] [blame] | 37 | int register_android_server_location_GpsLocationProvider(JNIEnv* env); |
destradaa | 1af4b02 | 2013-07-12 15:43:36 -0700 | [diff] [blame] | 38 | int register_android_server_location_FlpHardwareProvider(JNIEnv* env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 39 | int register_android_server_connectivity_Vpn(JNIEnv* env); |
Jeff Brown | 2687550 | 2014-01-30 21:47:47 -0800 | [diff] [blame] | 40 | int register_android_server_dreams_McuHal(JNIEnv* env); |
Jinsuk Kim | 4f512fb | 2014-02-28 17:41:17 +0900 | [diff] [blame] | 41 | int register_android_server_hdmi_HdmiCecService(JNIEnv* env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | using namespace android; |
| 45 | |
| 46 | extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) |
| 47 | { |
| 48 | JNIEnv* env = NULL; |
| 49 | jint result = -1; |
| 50 | |
| 51 | if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { |
Steve Block | 3762c31 | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 52 | ALOGE("GetEnv failed!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | return result; |
| 54 | } |
Steve Block | ec193de | 2012-01-09 18:35:44 +0000 | [diff] [blame] | 55 | ALOG_ASSERT(env, "Could not retrieve the env!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 56 | |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 57 | register_android_server_PowerManagerService(env); |
Mike Lockwood | b01e8bf | 2011-08-29 20:11:07 -0400 | [diff] [blame] | 58 | register_android_server_SerialService(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 59 | register_android_server_InputApplicationHandle(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 60 | register_android_server_InputWindowHandle(env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 61 | register_android_server_InputManager(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 62 | register_android_server_LightsService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | register_android_server_AlarmManagerService(env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 64 | register_android_server_UsbDeviceManager(env); |
| 65 | register_android_server_UsbHostManager(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 66 | register_android_server_VibratorService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | register_android_server_SystemServer(env); |
Mike Lockwood | 00b7427 | 2010-03-26 10:41:48 -0400 | [diff] [blame] | 68 | register_android_server_location_GpsLocationProvider(env); |
destradaa | 1af4b02 | 2013-07-12 15:43:36 -0700 | [diff] [blame] | 69 | register_android_server_location_FlpHardwareProvider(env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 70 | register_android_server_connectivity_Vpn(env); |
Romain Guy | 3b748a4 | 2013-04-17 18:54:38 -0700 | [diff] [blame] | 71 | register_android_server_AssetAtlasService(env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 72 | register_android_server_ConsumerIrService(env); |
Jeff Brown | 2687550 | 2014-01-30 21:47:47 -0800 | [diff] [blame] | 73 | register_android_server_dreams_McuHal(env); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 74 | register_android_server_BatteryStatsService(env); |
Jinsuk Kim | 4f512fb | 2014-02-28 17:41:17 +0900 | [diff] [blame] | 75 | register_android_server_hdmi_HdmiCecService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 76 | |
| 77 | return JNI_VERSION_1_4; |
| 78 | } |