OSDN Git Service

New Serial Manager API:
authorMike Lockwood <lockwood@android.com>
Tue, 30 Aug 2011 00:11:07 +0000 (20:11 -0400)
committerMike Lockwood <lockwood@android.com>
Tue, 30 Aug 2011 16:56:26 +0000 (12:56 -0400)
commit8b3b98d62234fb12625c00feb63ac9cc21931b59
tree33c41c4a7a7b1d24d3bfff1023180777de6d2166
parent47d129bcb9430a4c53cdccabcfc4df4d12719855
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.

Change-Id: I6afa78ceacf08486aaebced4156ecd2e33051879
Signed-off-by: Mike Lockwood <lockwood@android.com>
17 files changed:
Android.mk
core/java/android/app/ContextImpl.java
core/java/android/content/Context.java
core/java/android/hardware/ISerialManager.aidl [new file with mode: 0644]
core/java/android/hardware/SerialManager.java [new file with mode: 0644]
core/java/android/hardware/SerialPort.java [new file with mode: 0644]
core/jni/Android.mk
core/jni/AndroidRuntime.cpp
core/jni/android_hardware_SerialPort.cpp [new file with mode: 0644]
core/res/AndroidManifest.xml
core/res/res/values/config.xml
core/res/res/values/strings.xml
services/java/com/android/server/SerialService.java [new file with mode: 0644]
services/java/com/android/server/SystemServer.java
services/jni/Android.mk
services/jni/com_android_server_SerialService.cpp [new file with mode: 0644]
services/jni/onload.cpp