blob: 13ff28c0cdff35d3790a73637bd5bea59c931752 [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
Tomasz Wasilczykd7c21d32017-04-17 17:02:06 -070022#include "com_android_server_radio_RadioService.h"
23#include "com_android_server_radio_Tuner.h"
24
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025namespace android {
26int register_android_server_AlarmManagerService(JNIEnv* env);
Dianne Hackbornc51cf032014-03-02 19:08:15 -080027int register_android_server_BatteryStatsService(JNIEnv* env);
Erik Gilling51e95df2013-06-26 11:06:51 -070028int register_android_server_ConsumerIrService(JNIEnv *env);
Jeff Brown928e0542011-01-10 11:17:36 -080029int register_android_server_InputApplicationHandle(JNIEnv* env);
Jeff Brown928e0542011-01-10 11:17:36 -080030int register_android_server_InputWindowHandle(JNIEnv* env);
Jeff Brown46b9ac02010-04-22 18:58:52 -070031int register_android_server_InputManager(JNIEnv* env);
Mike Lockwood3a322132009-11-24 00:30:52 -050032int register_android_server_LightsService(JNIEnv* env);
Jeff Brown00fa7bd2010-07-02 15:37:36 -070033int register_android_server_PowerManagerService(JNIEnv* env);
Daichi Hirono3ff1c012016-10-28 12:53:44 +090034int register_android_server_storage_AppFuse(JNIEnv* env);
Mike Lockwoodb01e8bf2011-08-29 20:11:07 -040035int register_android_server_SerialService(JNIEnv* env);
Jinsuk Kim4f512fb2014-02-28 17:41:17 +090036int register_android_server_SystemServer(JNIEnv* env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040037int register_android_server_UsbDeviceManager(JNIEnv* env);
Mike Lockwood10024b32014-12-11 13:44:20 -080038int register_android_server_UsbMidiDevice(JNIEnv* env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040039int register_android_server_UsbHostManager(JNIEnv* env);
Ruben Brunkbaa4b552016-02-02 16:27:37 -080040int register_android_server_vr_VrManagerService(JNIEnv* env);
Mike Lockwood3a322132009-11-24 00:30:52 -050041int register_android_server_VibratorService(JNIEnv* env);
Ashutosh Joshi420e45e2016-12-20 16:34:41 -080042int register_android_server_location_ContextHubService(JNIEnv* env);
Lifu Tang30f95a72016-01-07 23:20:38 -080043int register_android_server_location_GnssLocationProvider(JNIEnv* env);
Chia-chi Yehff3bdca2011-05-23 17:26:46 -070044int register_android_server_connectivity_Vpn(JNIEnv* env);
Jungshik Jang0792d372014-04-23 17:57:26 +090045int register_android_server_hdmi_HdmiCecController(JNIEnv* env);
Sujith Ramakrishnanb5b86c12016-01-28 16:53:16 -080046int register_android_server_tv_TvUinputBridge(JNIEnv* env);
Wonsik Kimc22dbb62014-05-26 02:26:04 +000047int register_android_server_tv_TvInputHal(JNIEnv* env);
Andres Morales68d4acd2014-07-01 19:40:41 -070048int register_android_server_PersistentDataBlockService(JNIEnv* env);
Narayan Kamath29564cd2014-08-07 10:57:40 +010049int register_android_server_Watchdog(JNIEnv* env);
Polina Bondarenkof8754ac2016-02-12 20:38:23 +010050int register_android_server_HardwarePropertiesManagerService(JNIEnv* env);
Rubin Xu3bf722a2016-12-15 16:07:38 +000051int register_android_server_SyntheticPasswordManager(JNIEnv* env);
John Reckdf1742e2017-01-19 15:56:21 -080052int register_android_server_GraphicsStatsService(JNIEnv* env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080053};
54
55using namespace android;
56
Andreas Gampe184e3ed2014-09-29 15:04:06 -070057extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080058{
59 JNIEnv* env = NULL;
60 jint result = -1;
61
62 if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
Steve Block3762c312012-01-06 19:20:56 +000063 ALOGE("GetEnv failed!");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 return result;
65 }
Steve Blockec193de2012-01-09 18:35:44 +000066 ALOG_ASSERT(env, "Could not retrieve the env!");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067
Tomasz Wasilczykd7c21d32017-04-17 17:02:06 -070068 register_android_server_radio_RadioService(env);
69 register_android_server_radio_Tuner(env);
Jeff Brown00fa7bd2010-07-02 15:37:36 -070070 register_android_server_PowerManagerService(env);
Mike Lockwoodb01e8bf2011-08-29 20:11:07 -040071 register_android_server_SerialService(env);
Jeff Brown928e0542011-01-10 11:17:36 -080072 register_android_server_InputApplicationHandle(env);
Jeff Brown928e0542011-01-10 11:17:36 -080073 register_android_server_InputWindowHandle(env);
Jeff Brown46b9ac02010-04-22 18:58:52 -070074 register_android_server_InputManager(env);
Mike Lockwood3a322132009-11-24 00:30:52 -050075 register_android_server_LightsService(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076 register_android_server_AlarmManagerService(env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040077 register_android_server_UsbDeviceManager(env);
Mike Lockwood10024b32014-12-11 13:44:20 -080078 register_android_server_UsbMidiDevice(env);
Mike Lockwood46d0adf2011-05-26 10:27:39 -040079 register_android_server_UsbHostManager(env);
Ruben Brunkbaa4b552016-02-02 16:27:37 -080080 register_android_server_vr_VrManagerService(env);
Mike Lockwood3a322132009-11-24 00:30:52 -050081 register_android_server_VibratorService(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 register_android_server_SystemServer(env);
Ashutosh Joshi420e45e2016-12-20 16:34:41 -080083 register_android_server_location_ContextHubService(env);
Lifu Tang30f95a72016-01-07 23:20:38 -080084 register_android_server_location_GnssLocationProvider(env);
Chia-chi Yehff3bdca2011-05-23 17:26:46 -070085 register_android_server_connectivity_Vpn(env);
Erik Gilling51e95df2013-06-26 11:06:51 -070086 register_android_server_ConsumerIrService(env);
Dianne Hackbornc51cf032014-03-02 19:08:15 -080087 register_android_server_BatteryStatsService(env);
Jungshik Jang0792d372014-04-23 17:57:26 +090088 register_android_server_hdmi_HdmiCecController(env);
Sujith Ramakrishnanb5b86c12016-01-28 16:53:16 -080089 register_android_server_tv_TvUinputBridge(env);
Wonsik Kimc22dbb62014-05-26 02:26:04 +000090 register_android_server_tv_TvInputHal(env);
Andres Morales68d4acd2014-07-01 19:40:41 -070091 register_android_server_PersistentDataBlockService(env);
Narayan Kamath29564cd2014-08-07 10:57:40 +010092 register_android_server_Watchdog(env);
Polina Bondarenkof8754ac2016-02-12 20:38:23 +010093 register_android_server_HardwarePropertiesManagerService(env);
Daichi Hirono3ff1c012016-10-28 12:53:44 +090094 register_android_server_storage_AppFuse(env);
Rubin Xu3bf722a2016-12-15 16:07:38 +000095 register_android_server_SyntheticPasswordManager(env);
John Reckdf1742e2017-01-19 15:56:21 -080096 register_android_server_GraphicsStatsService(env);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080097
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080098 return JNI_VERSION_1_4;
99}