diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2011-01-19 13:59:32 -0800 |
|---|---|---|
| committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-01-19 14:06:29 -0800 |
| commit | fbe807d064ada99211b102914df514aa562256f8 (patch) | |
| tree | 012462235f36ab6ee1e3fe7088f4f9338f09bb39 /core/java/android/bluetooth/BluetoothPan.java | |
| parent | 529fc53d3fd298ee5aef20e3a07bd263f7376b8d (diff) | |
Make connection / disconnect failure more robust.
Add error codes so that the states can be tracked better.
Change-Id: Ic07a5d34589134b68dedeb4803ccb523aa01b567
Diffstat (limited to 'core/java/android/bluetooth/BluetoothPan.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothPan.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothPan.java b/core/java/android/bluetooth/BluetoothPan.java index 7dee25e4afa8..1f07349b4c13 100644 --- a/core/java/android/bluetooth/BluetoothPan.java +++ b/core/java/android/bluetooth/BluetoothPan.java @@ -70,6 +70,19 @@ public final class BluetoothPan { public static final int STATE_CONNECTED = 2; public static final int STATE_DISCONNECTING = 3; + /** + * Return codes for the connect and disconnect Bluez / Dbus calls. + */ + public static final int PAN_DISCONNECT_FAILED_NOT_CONNECTED = 1000; + + public static final int PAN_CONNECT_FAILED_ALREADY_CONNECTED = 1001; + + public static final int PAN_CONNECT_FAILED_ATTEMPT_FAILED = 1002; + + public static final int PAN_OPERATION_GENERIC_FAILURE = 1003; + + public static final int PAN_OPERATION_SUCCESS = 1004; + private final IBluetooth mService; private final Context mContext; |
