diff options
author | Chris Wailes <chriswailes@google.com> | 2019-08-21 17:22:54 -0700 |
---|---|---|
committer | Chris Wailes <chriswailes@google.com> | 2019-08-27 14:51:21 -0700 |
commit | 0388ad1f72c70ca96cabc8b1a4a107877752b187 (patch) | |
tree | 94ff69ee766eef44584623631e389b8775adc7f3 /framework/java/android/bluetooth/BluetoothSocket.java | |
parent | ed6755fa55d3dbf5426b0f8dc634d6040f9cef35 (diff) |
Remove a misleading "flush" function.
This patch removes LocalSocketImpl.flush(). In practice this function
was simply a wrapper around `Thread.sleep(10)`. All direct calls to
this function have been removed. The `flush()` function is still called
on several objects that wrap a SocketOutputStream.
This will make booting a device 20ms faster than it currently is.
Bug: 139192244
Test: Build -> flash -> boot -> launch app
Change-Id: I0a96f4bc72461670370f61e847349f32af5ac774
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothSocket.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothSocket.java | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/framework/java/android/bluetooth/BluetoothSocket.java b/framework/java/android/bluetooth/BluetoothSocket.java index a6e3153d6a..760166bfcc 100644 --- a/framework/java/android/bluetooth/BluetoothSocket.java +++ b/framework/java/android/bluetooth/BluetoothSocket.java @@ -515,20 +515,6 @@ public final class BluetoothSocket implements Closeable { return mSocketIS.available(); } - /** - * Wait until the data in sending queue is emptied. A polling version - * for flush implementation. Used to ensure the writing data afterwards will - * be packed in new RFCOMM frame. - * - * @throws IOException if an i/o error occurs. - */ - @UnsupportedAppUsage - /*package*/ void flush() throws IOException { - if (mSocketOS == null) throw new IOException("flush is called on null OutputStream"); - if (VDBG) Log.d(TAG, "flush: " + mSocketOS); - mSocketOS.flush(); - } - /*package*/ int read(byte[] b, int offset, int length) throws IOException { int ret = 0; if (VDBG) Log.d(TAG, "read in: " + mSocketIS + " len: " + length); |