History log of /frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fa0fd39a4bf296d254aa398c1b19ec960efa641d 24-Oct-2012 Zhihai Xu <zhihaixu@google.com> License of files Bluetooth package is not updated to ASL2

bug 7385618

Change-Id: I6232f537f4fda979d3aabe3a059c11d3299de9b8
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
b49a89635906e0901637a4a4c1c2f5bb263b6595 11-Oct-2012 zzy <zhenye@broadcom.com> Add serial port profile support and allow to connect to rfcomm channel without sdp discovery

bug 7272974

Change-Id: Idc10edc056b48da2fd96bea84eba3fb73b97bab1
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
563e414784eb81e4ea4051667d5c8855b17f7534 10-Oct-2012 Matthew Xie <mattx@google.com> Reduce android.bluetooth package debug messages

bug 7174712

Change-Id: I8d3fdc8edbe42068b5a550660d7b24854c3c4af4
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
d6883533e4ac3f73d2fde1db9a1dddf06dac6709 26-Apr-2012 fredc <fredc@broadcom.com> Fixed socket not closing on BT off. Used RemoteCallbackList to monitor binder deaths in BluetoothManagerService.

Change-Id: I524964bd2836d8c5a4bae095b93ac9481337941d
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
903ac6f399dcd4f574bf388daa7b5f5907d448d3 24-Apr-2012 fredc <fredc@broadcom.com> Fixed issue with Settings app crashing after during on/off and unpair.

Fixed issue with BluetoothAdapter.getRemoteDevice() returning null.

Change-Id: Ie86813532530a6b57bde1c430c7b4875ecc7354c
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
0f42037eb7b5118015c2caca635538324ccf0ccf 12-Apr-2012 fredc <fredc@broadcom.com> Non persistent adapter service

Change-Id: Ib13d5c77416e58161df0e04d7a15ec0dddbde8b5

Conflicts:

core/java/android/bluetooth/BluetoothInputDevice.java

Conflicts:

core/java/com/android/internal/app/ShutdownThread.java
services/java/com/android/server/SystemServer.java

Conflicts:

services/java/com/android/server/SystemServer.java
services/java/com/android/server/pm/ShutdownThread.java
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
3b147b770269173d5d711d6c33f142dc5e723824 04-Apr-2012 zzy <zhenye@broadcom.com> Added new rfcomm multi accept code
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
e4caddbb7a3b39fd6a1ccf107c7dbf09bc8978e8 26-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Changes for new Bluetooth APIs.

Changes to Bluetooth Adapter, Device and IBluetooth interfaces
for new Bluetooth APIs. Delete AudioGateway.

Change-Id: Ib51b31187eafde261441b9311b5e7e13c8bff82f
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.java
34b2feb041e263e11bbcec1f2a5094e21be9dc13 04-May-2012 Jason Simmons <jsimmons@google.com> Avoid calling BluetoothSocket.destroyNative twice

If the destroyNative JNI method is called twice, it will attempt to free
the socketData twice, and the second free will cause an assertion failure.

To avoid this, check whether mSocketState has already been set to CLOSED
while holding the write lock. If it has, then destroyNative has already
been called and should not be called again.

Bug: 3096033
Change-Id: Ic7c0bbf21823d389b26919da8c533d8ac4d49064
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.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/BluetoothSocket.java
ceb6c9f517ede73bfb677e55fda9d9db6089ae69 04-May-2011 Matthew Xie <mattx@google.com> Add public api BluetoothSocket.isConnected.

It's a convenent function to get the connection status of the bluetooth
socket, ie, whether there is an active connection with remote device.
bug 2149043

Change-Id: I4ca4e98c646f70746d838632f3035376b22d579b
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.java
52cde7279bad58285704498eea57bdaf9e595b49 06-Oct-2009 Nick Pelly <npelly@google.com> Fix docs builds.
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.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/BluetoothSocket.java
47e82dee6b18c33fab8c2cdf4f68b20d3663079e 02-Jun-2009 Nick Pelly <npelly@google.com> Implement bulk read and writes for Bluetooth sockets.

Before: 0.1 kB/s
After: 100 kB/s
(in my java BT speed test app)
/frameworks/base/core/java/android/bluetooth/BluetoothSocket.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/BluetoothSocket.java