Merge "Make Serial Manager APIs public" into ics-aah
This commit is contained in:
committed by
Android (Google) Code Review
commit
97bbefac0c
@@ -94,6 +94,7 @@ package android {
|
||||
field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS";
|
||||
field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
|
||||
field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
|
||||
field public static final java.lang.String SERIAL_PORT = "android.permission.SERIAL_PORT";
|
||||
field public static final java.lang.String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER";
|
||||
field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
|
||||
field public static final java.lang.String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH";
|
||||
@@ -5075,6 +5076,7 @@ package android.content {
|
||||
field public static final java.lang.String POWER_SERVICE = "power";
|
||||
field public static final java.lang.String SEARCH_SERVICE = "search";
|
||||
field public static final java.lang.String SENSOR_SERVICE = "sensor";
|
||||
field public static final java.lang.String SERIAL_SERVICE = "serial";
|
||||
field public static final java.lang.String STORAGE_SERVICE = "storage";
|
||||
field public static final java.lang.String TELEPHONY_SERVICE = "phone";
|
||||
field public static final java.lang.String TEXT_SERVICES_MANAGER_SERVICE = "textservices";
|
||||
@@ -9560,6 +9562,18 @@ package android.hardware {
|
||||
field public static final float STANDARD_GRAVITY = 9.80665f;
|
||||
}
|
||||
|
||||
public class SerialManager {
|
||||
method public java.lang.String[] getSerialPorts();
|
||||
method public android.hardware.SerialPort openSerialPort(java.lang.String, int) throws java.io.IOException;
|
||||
}
|
||||
|
||||
public class SerialPort {
|
||||
method public void close() throws java.io.IOException;
|
||||
method public java.lang.String getName();
|
||||
method public int read(java.nio.ByteBuffer) throws java.io.IOException;
|
||||
method public void write(java.nio.ByteBuffer, int) throws java.io.IOException;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.hardware.usb {
|
||||
|
||||
@@ -1785,8 +1785,6 @@ public abstract class Context {
|
||||
*
|
||||
* @see #getSystemService
|
||||
* @see android.harware.SerialManager
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String SERIAL_SERVICE = "serial";
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* This class provides access to serial ports
|
||||
*/
|
||||
public class SerialManager {
|
||||
private static final String TAG = "SerialManager";
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.io.OutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* This class provides support for reading and writing data to serial ports
|
||||
*/
|
||||
public class SerialPort {
|
||||
|
||||
|
||||
@@ -1457,8 +1457,7 @@
|
||||
android:description="@string/permdesc_bindPackageVerifier"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<!-- Allows applications to access serial ports via the SerialManager.
|
||||
@hide -->
|
||||
<!-- Allows applications to access serial ports via the SerialManager. -->
|
||||
<permission android:name="android.permission.SERIAL_PORT"
|
||||
android:label="@string/permlab_serialPort"
|
||||
android:description="@string/permdesc_serialPort"
|
||||
|
||||
Reference in New Issue
Block a user