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 | |
Steven Moreland | 2279b25 | 2017-07-19 09:50:45 -0700 | [diff] [blame] | 17 | #include <nativehelper/JNIHelp.h> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 18 | #include "jni.h" |
| 19 | #include "utils/Log.h" |
| 20 | #include "utils/misc.h" |
| 21 | |
Tomasz Wasilczyk | 6b4b646 | 2017-07-19 10:52:28 -0700 | [diff] [blame] | 22 | #include "BroadcastRadio/BroadcastRadioService.h" |
| 23 | #include "BroadcastRadio/Tuner.h" |
Tomasz Wasilczyk | d7c21d3 | 2017-04-17 17:02:06 -0700 | [diff] [blame] | 24 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | namespace android { |
| 26 | int register_android_server_AlarmManagerService(JNIEnv* env); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 27 | int register_android_server_BatteryStatsService(JNIEnv* env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 28 | int register_android_server_ConsumerIrService(JNIEnv *env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 29 | int register_android_server_InputApplicationHandle(JNIEnv* env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 30 | int register_android_server_InputWindowHandle(JNIEnv* env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 31 | int register_android_server_InputManager(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 32 | int register_android_server_LightsService(JNIEnv* env); |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 33 | int register_android_server_PowerManagerService(JNIEnv* env); |
Daichi Hirono | 3ff1c01 | 2016-10-28 12:53:44 +0900 | [diff] [blame] | 34 | int register_android_server_storage_AppFuse(JNIEnv* env); |
Mike Lockwood | b01e8bf | 2011-08-29 20:11:07 -0400 | [diff] [blame] | 35 | int register_android_server_SerialService(JNIEnv* env); |
Jinsuk Kim | 4f512fb | 2014-02-28 17:41:17 +0900 | [diff] [blame] | 36 | int register_android_server_SystemServer(JNIEnv* env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 37 | int register_android_server_UsbDeviceManager(JNIEnv* env); |
Mike Lockwood | 10024b3 | 2014-12-11 13:44:20 -0800 | [diff] [blame] | 38 | int register_android_server_UsbMidiDevice(JNIEnv* env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 39 | int register_android_server_UsbHostManager(JNIEnv* env); |
Ruben Brunk | baa4b55 | 2016-02-02 16:27:37 -0800 | [diff] [blame] | 40 | int register_android_server_vr_VrManagerService(JNIEnv* env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 41 | int register_android_server_VibratorService(JNIEnv* env); |
Lifu Tang | 30f95a7 | 2016-01-07 23:20:38 -0800 | [diff] [blame] | 42 | int register_android_server_location_GnssLocationProvider(JNIEnv* env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 43 | int register_android_server_connectivity_Vpn(JNIEnv* env); |
Erik Kline | 58ed1b0 | 2017-04-30 19:36:15 +0900 | [diff] [blame] | 44 | int register_android_server_connectivity_tethering_OffloadHardwareInterface(JNIEnv*); |
Pavel Grafov | b745540 | 2018-01-30 21:17:08 +0000 | [diff] [blame] | 45 | int register_android_server_devicepolicy_CryptoTestHelper(JNIEnv*); |
Jungshik Jang | 0792d37 | 2014-04-23 17:57:26 +0900 | [diff] [blame] | 46 | int register_android_server_hdmi_HdmiCecController(JNIEnv* env); |
Sujith Ramakrishnan | b5b86c1 | 2016-01-28 16:53:16 -0800 | [diff] [blame] | 47 | int register_android_server_tv_TvUinputBridge(JNIEnv* env); |
Wonsik Kim | c22dbb6 | 2014-05-26 02:26:04 +0000 | [diff] [blame] | 48 | int register_android_server_tv_TvInputHal(JNIEnv* env); |
Andres Morales | 68d4acd | 2014-07-01 19:40:41 -0700 | [diff] [blame] | 49 | int register_android_server_PersistentDataBlockService(JNIEnv* env); |
Narayan Kamath | 29564cd | 2014-08-07 10:57:40 +0100 | [diff] [blame] | 50 | int register_android_server_Watchdog(JNIEnv* env); |
Polina Bondarenko | f8754ac | 2016-02-12 20:38:23 +0100 | [diff] [blame] | 51 | int register_android_server_HardwarePropertiesManagerService(JNIEnv* env); |
Rubin Xu | 3bf722a | 2016-12-15 16:07:38 +0000 | [diff] [blame] | 52 | int register_android_server_SyntheticPasswordManager(JNIEnv* env); |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 53 | int register_android_server_GraphicsStatsService(JNIEnv* env); |
Santos Cordon | ee8931e | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 54 | int register_android_hardware_display_DisplayViewport(JNIEnv* env); |
Chenbo Feng | d3d9c4e | 2017-11-14 17:54:17 -0800 | [diff] [blame] | 55 | int register_android_server_net_NetworkStatsService(JNIEnv* env); |
Hirokazu Honda | d13a93f | 2018-01-16 16:11:28 +0900 | [diff] [blame] | 56 | #ifdef USE_ARC |
| 57 | int register_android_server_ArcVideoService(); |
| 58 | #endif |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | using namespace android; |
| 62 | |
Andreas Gampe | 184e3ed | 2014-09-29 15:04:06 -0700 | [diff] [blame] | 63 | extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 64 | { |
| 65 | JNIEnv* env = NULL; |
| 66 | jint result = -1; |
| 67 | |
| 68 | if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { |
Steve Block | 3762c31 | 2012-01-06 19:20:56 +0000 | [diff] [blame] | 69 | ALOGE("GetEnv failed!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | return result; |
| 71 | } |
Steve Block | ec193de | 2012-01-09 18:35:44 +0000 | [diff] [blame] | 72 | ALOG_ASSERT(env, "Could not retrieve the env!"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 73 | |
Tomasz Wasilczyk | 6b4b646 | 2017-07-19 10:52:28 -0700 | [diff] [blame] | 74 | register_android_server_broadcastradio_BroadcastRadioService(env); |
| 75 | register_android_server_broadcastradio_Tuner(vm, env); |
Jeff Brown | 00fa7bd | 2010-07-02 15:37:36 -0700 | [diff] [blame] | 76 | register_android_server_PowerManagerService(env); |
Mike Lockwood | b01e8bf | 2011-08-29 20:11:07 -0400 | [diff] [blame] | 77 | register_android_server_SerialService(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 78 | register_android_server_InputApplicationHandle(env); |
Jeff Brown | 928e054 | 2011-01-10 11:17:36 -0800 | [diff] [blame] | 79 | register_android_server_InputWindowHandle(env); |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 80 | register_android_server_InputManager(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 81 | register_android_server_LightsService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 82 | register_android_server_AlarmManagerService(env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 83 | register_android_server_UsbDeviceManager(env); |
Mike Lockwood | 10024b3 | 2014-12-11 13:44:20 -0800 | [diff] [blame] | 84 | register_android_server_UsbMidiDevice(env); |
Mike Lockwood | 46d0adf | 2011-05-26 10:27:39 -0400 | [diff] [blame] | 85 | register_android_server_UsbHostManager(env); |
Ruben Brunk | baa4b55 | 2016-02-02 16:27:37 -0800 | [diff] [blame] | 86 | register_android_server_vr_VrManagerService(env); |
Mike Lockwood | 3a32213 | 2009-11-24 00:30:52 -0500 | [diff] [blame] | 87 | register_android_server_VibratorService(env); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 88 | register_android_server_SystemServer(env); |
Lifu Tang | 30f95a7 | 2016-01-07 23:20:38 -0800 | [diff] [blame] | 89 | register_android_server_location_GnssLocationProvider(env); |
Chia-chi Yeh | ff3bdca | 2011-05-23 17:26:46 -0700 | [diff] [blame] | 90 | register_android_server_connectivity_Vpn(env); |
Erik Kline | 58ed1b0 | 2017-04-30 19:36:15 +0900 | [diff] [blame] | 91 | register_android_server_connectivity_tethering_OffloadHardwareInterface(env); |
Pavel Grafov | b745540 | 2018-01-30 21:17:08 +0000 | [diff] [blame] | 92 | register_android_server_devicepolicy_CryptoTestHelper(env); |
Erik Gilling | 51e95df | 2013-06-26 11:06:51 -0700 | [diff] [blame] | 93 | register_android_server_ConsumerIrService(env); |
Dianne Hackborn | c51cf03 | 2014-03-02 19:08:15 -0800 | [diff] [blame] | 94 | register_android_server_BatteryStatsService(env); |
Jungshik Jang | 0792d37 | 2014-04-23 17:57:26 +0900 | [diff] [blame] | 95 | register_android_server_hdmi_HdmiCecController(env); |
Sujith Ramakrishnan | b5b86c1 | 2016-01-28 16:53:16 -0800 | [diff] [blame] | 96 | register_android_server_tv_TvUinputBridge(env); |
Wonsik Kim | c22dbb6 | 2014-05-26 02:26:04 +0000 | [diff] [blame] | 97 | register_android_server_tv_TvInputHal(env); |
Andres Morales | 68d4acd | 2014-07-01 19:40:41 -0700 | [diff] [blame] | 98 | register_android_server_PersistentDataBlockService(env); |
Polina Bondarenko | f8754ac | 2016-02-12 20:38:23 +0100 | [diff] [blame] | 99 | register_android_server_HardwarePropertiesManagerService(env); |
Daichi Hirono | 3ff1c01 | 2016-10-28 12:53:44 +0900 | [diff] [blame] | 100 | register_android_server_storage_AppFuse(env); |
Rubin Xu | 3bf722a | 2016-12-15 16:07:38 +0000 | [diff] [blame] | 101 | register_android_server_SyntheticPasswordManager(env); |
John Reck | df1742e | 2017-01-19 15:56:21 -0800 | [diff] [blame] | 102 | register_android_server_GraphicsStatsService(env); |
Santos Cordon | ee8931e | 2017-04-05 10:31:15 -0700 | [diff] [blame] | 103 | register_android_hardware_display_DisplayViewport(env); |
Chenbo Feng | d3d9c4e | 2017-11-14 17:54:17 -0800 | [diff] [blame] | 104 | register_android_server_net_NetworkStatsService(env); |
Hirokazu Honda | d13a93f | 2018-01-16 16:11:28 +0900 | [diff] [blame] | 105 | #ifdef USE_ARC |
| 106 | register_android_server_ArcVideoService(); |
| 107 | #endif |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 108 | return JNI_VERSION_1_4; |
| 109 | } |