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); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 24 | int register_android_server_BatteryStatsService(JNIEnv* env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 25 | int register_android_server_ConsumerIrService(JNIEnv *env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 26 | int register_android_server_InputApplicationHandle(JNIEnv* env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 27 | int register_android_server_InputWindowHandle(JNIEnv* env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 28 | int register_android_server_InputManager(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 29 | int register_android_server_LightsService(JNIEnv* env); |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 30 | int register_android_server_PowerManagerService(JNIEnv* env); |
Daichi Hirono | 3ff1c01 | 2016-10-28 12:53:44 +0900 | [diff] [blame] | 31 | int register_android_server_storage_AppFuse(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); |
Mike Lockwood | 10024b3 | 2014-12-11 13:44:20 -0800 | [diff] [blame] | 35 | int register_android_server_UsbMidiDevice(JNIEnv* env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 36 | int register_android_server_UsbHostManager(JNIEnv* env); |
Ruben Brunk | baa4b55 | 2016-02-02 16:27:37 -0800 | [diff] [blame] | 37 | int register_android_server_vr_VrManagerService(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 38 | int register_android_server_VibratorService(JNIEnv* env); |
Ashutosh Joshi | 420e45e | 2016-12-20 16:34:41 -0800 | [diff] [blame] | 39 | int register_android_server_location_ContextHubService(JNIEnv* env); |
Lifu Tang | 30f95a7 | 2016-01-07 23:20:38 -0800 | [diff] [blame] | 40 | int register_android_server_location_GnssLocationProvider(JNIEnv* env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 41 | int register_android_server_connectivity_Vpn(JNIEnv* env); |
Jungshik Jang | 0792d37 | 2014-04-23 17:57:26 +0900 | [diff] [blame] | 42 | int register_android_server_hdmi_HdmiCecController(JNIEnv* env); |
Sujith Ramakrishnan | b5b86c1 | 2016-01-28 16:53:16 -0800 | [diff] [blame] | 43 | int register_android_server_tv_TvUinputBridge(JNIEnv* env); |
Wonsik Kim | c22dbb6 | 2014-05-26 02:26:04 +0000 | [diff] [blame] | 44 | int register_android_server_tv_TvInputHal(JNIEnv* env); |
Andres Morales | 68d4acd | 2014-07-01 19:40:41 -0700 | [diff] [blame] | 45 | int register_android_server_PersistentDataBlockService(JNIEnv* env); |
Narayan Kamath | 29564cd | 2014-08-07 10:57:40 +0100 | [diff] [blame] | 46 | int register_android_server_Watchdog(JNIEnv* env); |
Polina Bondarenko | f8754ac | 2016-02-12 20:38:23 +0100 | [diff] [blame] | 47 | int register_android_server_HardwarePropertiesManagerService(JNIEnv* env); |
Rubin Xu | 3bf722a | 2016-12-15 16:07:38 +0000 | [diff] [blame] | 48 | int register_android_server_SyntheticPasswordManager(JNIEnv* env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | using namespace android; |
| 52 | |
Andreas Gampe | 184e3ed | 2014-09-29 15:04:06 -0700 | [diff] [blame] | 53 | extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 54 | { |
| 55 | JNIEnv* env = NULL; |
| 56 | jint result = -1; |
| 57 | |
| 58 | if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { |
Steve Block | 3762c31 | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 59 | ALOGE("GetEnv failed!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 60 | return result; |
| 61 | } |
Steve Block | ec193de | 2012-01-09 18:35:44 +0000 | [diff] [blame] | 62 | ALOG_ASSERT(env, "Could not retrieve the env!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 64 | register_android_server_PowerManagerService(env); |
Mike Lockwood | b01e8bf | 2011-08-29 20:11:07 -0400 | [diff] [blame] | 65 | register_android_server_SerialService(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 66 | register_android_server_InputApplicationHandle(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 67 | register_android_server_InputWindowHandle(env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 68 | register_android_server_InputManager(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 69 | register_android_server_LightsService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | register_android_server_AlarmManagerService(env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 71 | register_android_server_UsbDeviceManager(env); |
Mike Lockwood | 10024b3 | 2014-12-11 13:44:20 -0800 | [diff] [blame] | 72 | register_android_server_UsbMidiDevice(env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 73 | register_android_server_UsbHostManager(env); |
Ruben Brunk | baa4b55 | 2016-02-02 16:27:37 -0800 | [diff] [blame] | 74 | register_android_server_vr_VrManagerService(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 75 | register_android_server_VibratorService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 76 | register_android_server_SystemServer(env); |
Ashutosh Joshi | 420e45e | 2016-12-20 16:34:41 -0800 | [diff] [blame] | 77 | register_android_server_location_ContextHubService(env); |
Lifu Tang | 30f95a7 | 2016-01-07 23:20:38 -0800 | [diff] [blame] | 78 | register_android_server_location_GnssLocationProvider(env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 79 | register_android_server_connectivity_Vpn(env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 80 | register_android_server_ConsumerIrService(env); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 81 | register_android_server_BatteryStatsService(env); |
Jungshik Jang | 0792d37 | 2014-04-23 17:57:26 +0900 | [diff] [blame] | 82 | register_android_server_hdmi_HdmiCecController(env); |
Sujith Ramakrishnan | b5b86c1 | 2016-01-28 16:53:16 -0800 | [diff] [blame] | 83 | register_android_server_tv_TvUinputBridge(env); |
Wonsik Kim | c22dbb6 | 2014-05-26 02:26:04 +0000 | [diff] [blame] | 84 | register_android_server_tv_TvInputHal(env); |
Andres Morales | 68d4acd | 2014-07-01 19:40:41 -0700 | [diff] [blame] | 85 | register_android_server_PersistentDataBlockService(env); |
Narayan Kamath | 29564cd | 2014-08-07 10:57:40 +0100 | [diff] [blame] | 86 | register_android_server_Watchdog(env); |
Polina Bondarenko | f8754ac | 2016-02-12 20:38:23 +0100 | [diff] [blame] | 87 | register_android_server_HardwarePropertiesManagerService(env); |
Daichi Hirono | 3ff1c01 | 2016-10-28 12:53:44 +0900 | [diff] [blame] | 88 | register_android_server_storage_AppFuse(env); |
Rubin Xu | 3bf722a | 2016-12-15 16:07:38 +0000 | [diff] [blame] | 89 | register_android_server_SyntheticPasswordManager(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 90 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 91 | return JNI_VERSION_1_4; |
| 92 | } |