• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 #include <nativehelper/JNIHelp.h>
18 #include "jni.h"
19 #include "utils/Log.h"
20 #include "utils/misc.h"
21 
22 #include "BroadcastRadio/BroadcastRadioService.h"
23 #include "BroadcastRadio/Tuner.h"
24 
25 namespace android {
26 int register_android_server_AlarmManagerService(JNIEnv* env);
27 int register_android_server_BatteryStatsService(JNIEnv* env);
28 int register_android_server_ConsumerIrService(JNIEnv *env);
29 int register_android_server_InputApplicationHandle(JNIEnv* env);
30 int register_android_server_InputWindowHandle(JNIEnv* env);
31 int register_android_server_InputManager(JNIEnv* env);
32 int register_android_server_LightsService(JNIEnv* env);
33 int register_android_server_PowerManagerService(JNIEnv* env);
34 int register_android_server_storage_AppFuse(JNIEnv* env);
35 int register_android_server_SerialService(JNIEnv* env);
36 int register_android_server_SystemServer(JNIEnv* env);
37 int register_android_server_UsbDeviceManager(JNIEnv* env);
38 int register_android_server_UsbMidiDevice(JNIEnv* env);
39 int register_android_server_UsbHostManager(JNIEnv* env);
40 int register_android_server_vr_VrManagerService(JNIEnv* env);
41 int register_android_server_VibratorService(JNIEnv* env);
42 int register_android_server_location_ContextHubService(JNIEnv* env);
43 int register_android_server_location_GnssLocationProvider(JNIEnv* env);
44 int register_android_server_connectivity_Vpn(JNIEnv* env);
45 int register_android_server_connectivity_tethering_OffloadHardwareInterface(JNIEnv*);
46 int register_android_server_hdmi_HdmiCecController(JNIEnv* env);
47 int register_android_server_tv_TvUinputBridge(JNIEnv* env);
48 int register_android_server_tv_TvInputHal(JNIEnv* env);
49 int register_android_server_PersistentDataBlockService(JNIEnv* env);
50 int register_android_server_Watchdog(JNIEnv* env);
51 int register_android_server_HardwarePropertiesManagerService(JNIEnv* env);
52 int register_android_server_SyntheticPasswordManager(JNIEnv* env);
53 int register_android_server_GraphicsStatsService(JNIEnv* env);
54 int register_android_hardware_display_DisplayViewport(JNIEnv* env);
55 };
56 
57 using namespace android;
58 
JNI_OnLoad(JavaVM * vm,void *)59 extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
60 {
61     JNIEnv* env = NULL;
62     jint result = -1;
63 
64     if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
65         ALOGE("GetEnv failed!");
66         return result;
67     }
68     ALOG_ASSERT(env, "Could not retrieve the env!");
69 
70     register_android_server_broadcastradio_BroadcastRadioService(env);
71     register_android_server_broadcastradio_Tuner(vm, env);
72     register_android_server_PowerManagerService(env);
73     register_android_server_SerialService(env);
74     register_android_server_InputApplicationHandle(env);
75     register_android_server_InputWindowHandle(env);
76     register_android_server_InputManager(env);
77     register_android_server_LightsService(env);
78     register_android_server_AlarmManagerService(env);
79     register_android_server_UsbDeviceManager(env);
80     register_android_server_UsbMidiDevice(env);
81     register_android_server_UsbHostManager(env);
82     register_android_server_vr_VrManagerService(env);
83     register_android_server_VibratorService(env);
84     register_android_server_SystemServer(env);
85     register_android_server_location_ContextHubService(env);
86     register_android_server_location_GnssLocationProvider(env);
87     register_android_server_connectivity_Vpn(env);
88     register_android_server_connectivity_tethering_OffloadHardwareInterface(env);
89     register_android_server_ConsumerIrService(env);
90     register_android_server_BatteryStatsService(env);
91     register_android_server_hdmi_HdmiCecController(env);
92     register_android_server_tv_TvUinputBridge(env);
93     register_android_server_tv_TvInputHal(env);
94     register_android_server_PersistentDataBlockService(env);
95     register_android_server_Watchdog(env);
96     register_android_server_HardwarePropertiesManagerService(env);
97     register_android_server_storage_AppFuse(env);
98     register_android_server_SyntheticPasswordManager(env);
99     register_android_server_GraphicsStatsService(env);
100     register_android_hardware_display_DisplayViewport(env);
101 
102     return JNI_VERSION_1_4;
103 }
104