Merge "Add serial port profile support and allow to connect to rfcomm channel without sdp discovery" into jb-mr1-dev

This commit is contained in:
Matthew Xie
2012-10-16 12:57:52 -07:00
committed by Android (Google) Code Review

View File

@@ -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;