summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth
diff options
context:
space:
mode:
authorzzy <zhenye@broadcom.com>2012-10-11 14:52:43 -0700
committerMatthew Xie <mattx@google.com>2012-10-15 22:30:29 -0700
commitb49a89635906e0901637a4a4c1c2f5bb263b6595 (patch)
tree9657bd87eb173a0f18b45393c00ea9605fb1bbeb /core/java/android/bluetooth
parente6e810048ea85e48ec74f6a9e0b18f5dd3d475e1 (diff)
downloadframeworks_base-b49a89635906e0901637a4a4c1c2f5bb263b6595.zip
frameworks_base-b49a89635906e0901637a4a4c1c2f5bb263b6595.tar.gz
frameworks_base-b49a89635906e0901637a4a4c1c2f5bb263b6595.tar.bz2
Add serial port profile support and allow to connect to rfcomm channel without sdp discovery
bug 7272974 Change-Id: Idc10edc056b48da2fd96bea84eba3fb73b97bab1
Diffstat (limited to 'core/java/android/bluetooth')
-rw-r--r--core/java/android/bluetooth/BluetoothSocket.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index aba8710..8cbf5b1 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -19,6 +19,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
+import java.util.UUID;
import android.net.LocalSocket;
import java.nio.ByteOrder;
import java.nio.ByteBuffer;
@@ -140,7 +141,9 @@ public final class BluetoothSocket implements Closeable {
throw new IOException("Invalid RFCOMM channel: " + port);
}
}
- mUuid = uuid;
+ if(uuid != null)
+ mUuid = uuid;
+ else mUuid = new ParcelUuid(new UUID(0, 0));
mType = type;
mAuth = auth;
mEncrypt = encrypt;