blob: 899640e138e34c6a9598c7657faaee80822781da [file] [log] [blame]
James Dong199d1c12011-03-17 11:48:13 -07001/*
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 Project9066cfe2009-03-03 19:31:44 -080017#include "JNIHelp.h"
18#include "jni.h"
19#include "utils/Log.h"
20#include "utils/misc.h"
21
22namespace android {
23int register_android_server_AlarmManagerService(JNIEnv* env);
Dianne Hackbornc51cf032014-03-02 19:08:15 -080024int register_android_server_BatteryStatsService(JNIEnv* env);
Erik Gilling51e95df2013-06-26 11:06:51 -070025int register_android_server_ConsumerIrService(JNIEnv *env);
Jeff Brown928e0542011-01-10 11:17:36 -080026int register_android_server_InputApplicationHandle(JNIEnv* env);
Jeff Brown928e0542011-01-10 11:17:36 -080027int register_android_server_InputWindowHandle(JNIEnv* env);
Jeff Brown46b9ac02010-04-22 18:58:52 -070028int register_android_server_InputManager(JNIEnv* env);
Mike Lockwood3a322132009-11-24 00:30:52 -050029int register_android_server_LightsService(JNIEnv* env);
Jeff Brown00fa7bd2010-07-02 15:37:36 -070030int register_android_server_PowerManagerService(JNIEnv* env);
Daichi Hirono3ff1c012016-10-28 12:53:44 +090031int register_android_server_storage_AppFuse(JNIEnv* env);
Mike Lockwoodb01e8bf2011-08-29 20:11:07 -040032int register_android_server_SerialService(JNIEnv* env);
Jinsuk Kim4f512fb2014-02-28 17:41:17 +090033int register_android_server_SystemServer(JNIEnv* env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040034int register_android_server_UsbDeviceManager(JNIEnv* env);
Mike Lockwood10024b32014-12-11 13:44:20 -080035int register_android_server_UsbMidiDevice(JNIEnv* env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040036int register_android_server_UsbHostManager(JNIEnv* env);
Ruben Brunkbaa4b552016-02-02 16:27:37 -080037int register_android_server_vr_VrManagerService(JNIEnv* env);
Mike Lockwood3a322132009-11-24 00:30:52 -050038int register_android_server_VibratorService(JNIEnv* env);
Ashutosh Joshi420e45e2016-12-20 16:34:41 -080039int register_android_server_location_ContextHubService(JNIEnv* env);
Lifu Tang30f95a72016-01-07 23:20:38 -080040int register_android_server_location_GnssLocationProvider(JNIEnv* env);
Chia-chi Yehff3bdca2011-05-23 17:26:46 -070041int register_android_server_connectivity_Vpn(JNIEnv* env);
Jungshik Jang0792d372014-04-23 17:57:26 +090042int register_android_server_hdmi_HdmiCecController(JNIEnv* env);
Sujith Ramakrishnanb5b86c12016-01-28 16:53:16 -080043int register_android_server_tv_TvUinputBridge(JNIEnv* env);
Wonsik Kimc22dbb62014-05-26 02:26:04 +000044int register_android_server_tv_TvInputHal(JNIEnv* env);
Andres Morales68d4acd2014-07-01 19:40:41 -070045int register_android_server_PersistentDataBlockService(JNIEnv* env);
Narayan Kamath29564cd2014-08-07 10:57:40 +010046int register_android_server_Watchdog(JNIEnv* env);
Polina Bondarenkof8754ac2016-02-12 20:38:23 +010047int register_android_server_HardwarePropertiesManagerService(JNIEnv* env);
Rubin Xu3bf722a2016-12-15 16:07:38 +000048int register_android_server_SyntheticPasswordManager(JNIEnv* env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049};
50
51using namespace android;
52
Andreas Gampe184e3ed2014-09-29 15:04:06 -070053extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080054{
55 JNIEnv* env = NULL;
56 jint result = -1;
57
58 if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
Steve Block3762c312012-01-06 19:20:56 +000059 ALOGE("GetEnv failed!");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080060 return result;
61 }
Steve Blockec193de2012-01-09 18:35:44 +000062 ALOG_ASSERT(env, "Could not retrieve the env!");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063
Jeff Brown00fa7bd2010-07-02 15:37:36 -070064 register_android_server_PowerManagerService(env);
Mike Lockwoodb01e8bf2011-08-29 20:11:07 -040065 register_android_server_SerialService(env);
Jeff Brown928e0542011-01-10 11:17:36 -080066 register_android_server_InputApplicationHandle(env);
Jeff Brown928e0542011-01-10 11:17:36 -080067 register_android_server_InputWindowHandle(env);
Jeff Brown46b9ac02010-04-22 18:58:52 -070068 register_android_server_InputManager(env);
Mike Lockwood3a322132009-11-24 00:30:52 -050069 register_android_server_LightsService(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080070 register_android_server_AlarmManagerService(env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040071 register_android_server_UsbDeviceManager(env);
Mike Lockwood10024b32014-12-11 13:44:20 -080072 register_android_server_UsbMidiDevice(env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040073 register_android_server_UsbHostManager(env);
Ruben Brunkbaa4b552016-02-02 16:27:37 -080074 register_android_server_vr_VrManagerService(env);
Mike Lockwood3a322132009-11-24 00:30:52 -050075 register_android_server_VibratorService(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076 register_android_server_SystemServer(env);
Ashutosh Joshi420e45e2016-12-20 16:34:41 -080077 register_android_server_location_ContextHubService(env);
Lifu Tang30f95a72016-01-07 23:20:38 -080078 register_android_server_location_GnssLocationProvider(env);
Chia-chi Yehff3bdca2011-05-23 17:26:46 -070079 register_android_server_connectivity_Vpn(env);
Erik Gilling51e95df2013-06-26 11:06:51 -070080 register_android_server_ConsumerIrService(env);
Dianne Hackbornc51cf032014-03-02 19:08:15 -080081 register_android_server_BatteryStatsService(env);
Jungshik Jang0792d372014-04-23 17:57:26 +090082 register_android_server_hdmi_HdmiCecController(env);
Sujith Ramakrishnanb5b86c12016-01-28 16:53:16 -080083 register_android_server_tv_TvUinputBridge(env);
Wonsik Kimc22dbb62014-05-26 02:26:04 +000084 register_android_server_tv_TvInputHal(env);
Andres Morales68d4acd2014-07-01 19:40:41 -070085 register_android_server_PersistentDataBlockService(env);
Narayan Kamath29564cd2014-08-07 10:57:40 +010086 register_android_server_Watchdog(env);
Polina Bondarenkof8754ac2016-02-12 20:38:23 +010087 register_android_server_HardwarePropertiesManagerService(env);
Daichi Hirono3ff1c012016-10-28 12:53:44 +090088 register_android_server_storage_AppFuse(env);
Rubin Xu3bf722a2016-12-15 16:07:38 +000089 register_android_server_SyntheticPasswordManager(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080090
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080091 return JNI_VERSION_1_4;
92}