e7d511e148
UsbManager: - is now a service retrievable via Context.getSystemService(Context.USB_SERVICE). - provides support for returning a list all connected USB devices - broadcasts ACTION_USB_DEVICE_ATTACHED and USB_DEVICE_DETACHED when devices are added and removed from the USB host bus UsbDevice: - represents an attached USB device. UsbInterface: - represents an interface on a USB device - devices may have multiple interfaces if they provide multiple sets of functionality (for example, android phones typically have interfaces for both USB mass storage and adb) UsbEndpoint: - represents an endpoint on a USB interface - endpoints are used for sending or receiving data (only in one or the other direction) UsbRequest: - encapsulates a send or receive request to be sent over an endpoint Change-Id: Ieef3e434c62760770ea839070cf5eba1a705967a Signed-off-by: Mike Lockwood <lockwood@android.com>
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
#include "JNIHelp.h"
|
|
#include "jni.h"
|
|
#include "utils/Log.h"
|
|
#include "utils/misc.h"
|
|
|
|
namespace android {
|
|
int register_android_server_AlarmManagerService(JNIEnv* env);
|
|
int register_android_server_BatteryService(JNIEnv* env);
|
|
int register_android_server_InputApplication(JNIEnv* env);
|
|
int register_android_server_InputApplicationHandle(JNIEnv* env);
|
|
int register_android_server_InputWindow(JNIEnv* env);
|
|
int register_android_server_InputWindowHandle(JNIEnv* env);
|
|
int register_android_server_InputManager(JNIEnv* env);
|
|
int register_android_server_LightsService(JNIEnv* env);
|
|
int register_android_server_PowerManagerService(JNIEnv* env);
|
|
int register_android_server_UsbService(JNIEnv* env);
|
|
int register_android_server_VibratorService(JNIEnv* env);
|
|
int register_android_server_SystemServer(JNIEnv* env);
|
|
int register_android_server_location_GpsLocationProvider(JNIEnv* env);
|
|
};
|
|
|
|
using namespace android;
|
|
|
|
extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
|
{
|
|
JNIEnv* env = NULL;
|
|
jint result = -1;
|
|
|
|
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
|
|
LOGE("GetEnv failed!");
|
|
return result;
|
|
}
|
|
LOG_ASSERT(env, "Could not retrieve the env!");
|
|
|
|
register_android_server_PowerManagerService(env);
|
|
register_android_server_InputApplication(env);
|
|
register_android_server_InputApplicationHandle(env);
|
|
register_android_server_InputWindow(env);
|
|
register_android_server_InputWindowHandle(env);
|
|
register_android_server_InputManager(env);
|
|
register_android_server_LightsService(env);
|
|
register_android_server_AlarmManagerService(env);
|
|
register_android_server_BatteryService(env);
|
|
register_android_server_UsbService(env);
|
|
register_android_server_VibratorService(env);
|
|
register_android_server_SystemServer(env);
|
|
register_android_server_location_GpsLocationProvider(env);
|
|
|
|
return JNI_VERSION_1_4;
|
|
}
|