History log of /frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3b147b770269173d5d711d6c33f142dc5e723824 04-Apr-2012 zzy <zhenye@broadcom.com> Added new rfcomm multi accept code
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
3aef8e1d1b2f0b87d470bcccf37ba4ebb6560c45 20-Dec-2011 Joe Fernandez <joefernandez@google.com> docs: Add developer guide cross-references, Project ACRE, round 4

Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
6d8b80dd8c56dba02dcb6e64ace37fb85aeee1f5 08-Jul-2011 Ben Dodson <bjdodson@google.com> Get server's listening channel

Change-Id: Ia1cb3486a4ba502185efdcf6d7bcf0f37bb55261
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
f51eadaf1f83abfe16a609a4ded6d789494689b2 21-Sep-2010 Jake Hamby <jhamby@google.com> Typo fixes in comments and minor code cleanups.

* Fix some typos in Javadoc and log messages.
* Remove redundant initializer in BluetoothAdapter.readOutOfBandData()
* Use canonical "UTF-8" charset name instead of "UTF8" in
BluetoothDevice.convertPinToBytes()

Change-Id: I58cd5dc48a7ad0053d204c5f590b4b3d438d8672
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
6d95fc0a2ca910212a43c4547c0ef000659b72dc 20-Nov-2009 Scott Main <smain@google.com> docs for ESR: add docs to bluetooth explainin that discovery should
be cancelled before connecting to a device

bug: 2160782,2198463
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
9fab0aef19a4633d2e4670564e5d7ae9e52fe11f 04-Nov-2009 Scott Main <smain@google.com> docs: add more documentation for the bluetooth apis.

more descriptions for some of the classes and a new
overview and pseudo-code example for using BT APIs
in the package summary.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
16fb88a673c41b93c5d57ccb28c2697e7d87701a 07-Oct-2009 Nick Pelly <npelly@google.com> Encourage developers to connect RFCOMM by UUID instead of Channel.

Hide createRfcommSocket(int channel)
Add createRfcommSocketWithServiceRecord(UUID uuid)

Rename listenUsingRfcomm(String,UUID) -> listenUsingRfcommWithServiceRecord(..)

Now we have a complete API for developers to make peer-peer RFCOMM connections
with hard-coding the limited (30) RFCOMM channels, instead using SDP lookup
of an UUID.

This commit addresses two serious bugs:
- Do not throw IOException on accepting an incoming RFCOMM connection with
BluetoothSocket. This was a regression from commit 24bb9b8af4ff6915
- Workaround failure of bluez to update SDP cache when channel changes by
trying to use the same RFCOMM channel on the server every time, instead
of picking server channels randomly. This is a pretty ugly workaround,
and we are still trying to fix the caching issue - but with this
workaround we are at least shippable and apps will work at least until
they start colliding on the 30 RFCOMM channels.

DrNo: eastham
Bug: 2158900
Joke: What did the digital watch say to his mom? "Look mom no hands."
Change-Id: Ia4879943b83afac06b6f1a3f2391cf1628afce7d
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
52cde7279bad58285704498eea57bdaf9e595b49 06-Oct-2009 Nick Pelly <npelly@google.com> Fix docs builds.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
24bb9b8af4ff691538fe9e517e8156016b0da6cd 03-Oct-2009 Nick Pelly <npelly@google.com> Provide an API for apps to use a dynamic RFCOMM channel and SDP record.

Hide listenUsingRfcommOn(int channel)
Add listenUsingRfcomm(String name, ParcelUuid uuid)

The new API automatically finds a free RFCOMM channel and registers an SDP
record with the given uuid and name. The SDP record is automatically
removed when the socket is closed, or if the application dies.

Apps are prevented from registering SDP records with the uuid of system
Bluetooth profiles, such as A2DP, HFP and OPP.

Apps are prevented from removing SDP records that they did not create. This is
tracked by pid.

TODO: Provide an API for the connecting app to look up an SDP record.

Bug: 2158900
DrNo: eastham
Joke: "What did the dog say to the tree? bark."
Change-Id: Ia92f51c34615a7270a403255ad2b8faa98c4a3f5
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
cf44059813539bf7f36dabd278cef93ba3122c56 08-Sep-2009 Nick Pelly <npelly@google.com> Add javadoc to explain which permissions are required for Public BT API's.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
71c3c7806acb2b2b7b8441817c26a2101d447bbe 02-Sep-2009 Nick Pelly <npelly@google.com> Immediately destroy BluetoothSocket's on close().

Unfortunatley, shutdown() on the underlying fd does not actually stop a
listening socket from listening. You need to call close() on the fd to
do this. There is no way around it.

So this means the Java BluetoothSocket code has to call destroyNative() during
BluetoothSocket.close().

Since native methods cannot be called after destroyNative(), add a ReadWrite
lock and mClosed field to protect access to native methods.

This fixes the "resource busy" error when Bluetooth OPP and Bluetooth PBAP
tried to resume listening after turning BT off and then on.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
45e2704ff512d41e22af2801d76e96955469ce8d 19-Aug-2009 Nick Pelly <npelly@google.com> API CHANGE

Javadoc, and unhide the first pieces of the Bluetooth API.

With this commit there is enough public API to connect and use an RFCOMM
connection between Bluetooth devices.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
bd022f423a33f0794bb53e5b0720da2d67e4631c 15-Aug-2009 Nick Pelly <npelly@google.com> Bluetooth: API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
6a669fac385b51b8bb01844b77a9a43840dda854 03-Jun-2009 Nick Pelly <npelly@google.com> Implement and expose SCO socket support in BluetoothSocket.java.

Implement L2CAP socket support, but do not expose it (untested).

NEXT: Switch to Builder style constructor instead of factory method.
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java
0b6955a48bad9aee01ae2f0c06d3f168ca603ab7 27-May-2009 Nick Pelly <npelly@google.com> New BluetoothSocket API.

Modeled on blocking java.net.Socket and java.net.ServerSocket library.

Public interface is:

public final class BluetoothSocket implements Closeable {
public static BluetoothSocket createRfcommSocket(String address, int port) throws IOException;
public static BluetoothSocket createInsecureRfcommSocket(String address, int port) throws IOException;

public void connect() throws IOException;
public void close() throws IOException;

public String getAddress();
public InputStream getInputStream() throws IOException;
public OutputStream getOutputStream() throws IOException;
}

public final class BluetoothServerSocket implements Closeable {
public static BluetoothServerSocket listenUsingRfcommOn(int port) throws IOException;
public static BluetoothServerSocket listenUsingUnsecureRfcommOn(int port) throws IOException;

public BluetoothSocket accept() throws IOException;
public BluetoothSocket accept(int timeout) throws IOException;
public void close() throws IOException;

}
/frameworks/base/core/java/android/bluetooth/BluetoothServerSocket.java