From 647fee87dc9524554707deecd94d0cca2933f3bf Mon Sep 17 00:00:00 2001 From: Christian Wailes Date: Wed, 4 Sep 2019 23:35:54 +0000 Subject: Revert "Revert "Remove a misleading "flush" function."" This reverts commit 47da17740520f3d6ba952c65593f8660b89b8abf. Reason for revert: Fixed the test broken by the original commit Bug: 139192244 Bug: 140336855 Test: m -> flash -> boot Test: atest CtsJvmtiAttachingHostTestCases Change-Id: I4c67ad8709652c4710ef24564e0240f74f817f8c --- core/java/android/bluetooth/BluetoothSocket.java | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'core/java/android/bluetooth/BluetoothSocket.java') diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java index a6e3153d6af7..760166bfcc5d 100644 --- a/core/java/android/bluetooth/BluetoothSocket.java +++ b/core/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); -- cgit v1.2.3