Skip to content

Commit a3d5b68

Browse files
Matthew XieAndroid (Google) Code Review
authored andcommitted
Merge "Add serial port profile support and allow to connect to rfcomm channel without sdp discovery" into jb-mr1-dev
2 parents 40b7ea4 + b49a896 commit a3d5b68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/java/android/bluetooth/BluetoothSocket.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.InputStream;
2020
import java.io.OutputStream;
2121
import java.util.List;
22+
import java.util.UUID;
2223
import android.net.LocalSocket;
2324
import java.nio.ByteOrder;
2425
import java.nio.ByteBuffer;
@@ -140,7 +141,9 @@ private enum SocketState {
140141
throw new IOException("Invalid RFCOMM channel: " + port);
141142
}
142143
}
143-
mUuid = uuid;
144+
if(uuid != null)
145+
mUuid = uuid;
146+
else mUuid = new ParcelUuid(new UUID(0, 0));
144147
mType = type;
145148
mAuth = auth;
146149
mEncrypt = encrypt;

0 commit comments

Comments
 (0)