Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12d518f5 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Close output stream before getting response

am: e026ad50

Change-Id: I54248b785427cce08568d7fed2bb329f90b3af02
parents ff83745a e026ad50
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -496,6 +496,10 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
                handleSendException(e.toString());
            } finally {
                try {
                    if (outputStream != null) {
                      outputStream.close();
                    }

                    // Close InputStream and remove SendFileInfo from map
                    BluetoothOppUtility.closeSendFileInfo(mInfo.mUri);
                    if (!error) {
@@ -524,9 +528,6 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
                    if (inputStream != null) {
                        inputStream.close();
                    }
                    if (outputStream != null) {
                        outputStream.close();
                    }
                    if (putOperation != null) {
                        putOperation.close();
                    }