From b01e8bf57b7492b77e3445db51471edcbadda75e Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 29 Aug 2011 20:11:07 -0400 Subject: New Serial Manager API: SerialManager: provides access to serial ports SerialPort: for reading and writing data to and from serial ports IO with both array based and direct ByteBuffers is supported. Accessing serial ports requires android.permission.SERIAL_PORT permission Each platform must configure list of supported serial ports in the config_serialPorts resource overlay (this is needed to prevent apps from accidentally accessing the bluetooth or other system UARTs). In addition, the platform uevent.rc file must set the owner to the /dev/tty* files to "system" so the framework can access the port. Signed-off-by: Mike Lockwood --- core/jni/AndroidRuntime.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/jni/AndroidRuntime.cpp') diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 8a3063f..3067e75 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -76,6 +76,7 @@ extern int register_android_opengl_jni_GLES20(JNIEnv* env); extern int register_android_hardware_Camera(JNIEnv *env); extern int register_android_hardware_SensorManager(JNIEnv *env); +extern int register_android_hardware_SerialPort(JNIEnv *env); extern int register_android_hardware_UsbDevice(JNIEnv *env); extern int register_android_hardware_UsbDeviceConnection(JNIEnv *env); extern int register_android_hardware_UsbRequest(JNIEnv *env); @@ -1157,6 +1158,7 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_com_android_internal_os_ZygoteInit), REG_JNI(register_android_hardware_Camera), REG_JNI(register_android_hardware_SensorManager), + REG_JNI(register_android_hardware_SerialPort), REG_JNI(register_android_hardware_UsbDevice), REG_JNI(register_android_hardware_UsbDeviceConnection), REG_JNI(register_android_hardware_UsbRequest), -- cgit v1.1