History log of /frameworks/base/core/java/android/bluetooth/BluetoothOutputStream.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
71bfafc84af4b820748b12e1a1010b0dfa7bdea6 17-Apr-2013 zzy <zhenye@broadcom.com> Added flush() for bluetooth output stream

Bug 8498784

Zebra QL420 Plus Bluetooth printer fails on Android 4.2.2
/frameworks/base/core/java/android/bluetooth/BluetoothOutputStream.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/BluetoothOutputStream.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/BluetoothOutputStream.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/BluetoothOutputStream.java