Loading src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -611,7 +611,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { } finally { try { // Close InputStream and remove SendFileInfo from map BluetoothOppUtility.closeSendFileInfo(mInfo.mUri); BluetoothOppUtility.closeSendFileInfo(mInfo.mUri, fileInfo); if (uiUpdateThread != null) { uiUpdateThread.interrupt (); Loading src/com/android/bluetooth/opp/BluetoothOppService.java +1 −1 Original line number Diff line number Diff line Loading @@ -719,7 +719,7 @@ public class BluetoothOppService extends Service { if (sendFileInfo == null || sendFileInfo.mInputStream == null) { Log.e(TAG, "Can't open file for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); BluetoothOppUtility.closeSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri, sendFileInfo); return; } } Loading src/com/android/bluetooth/opp/BluetoothOppTransfer.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (info.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { BluetoothOppSendFileInfo fileInfo = BluetoothOppUtility.getSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri, fileInfo); if (fileInfo.mFileName != null) { updateValues.put(BluetoothShare.FILENAME_HINT, fileInfo.mFileName); updateValues.put(BluetoothShare.TOTAL_BYTES, fileInfo.mLength); Loading src/com/android/bluetooth/opp/BluetoothOppUtility.java +5 −5 Original line number Diff line number Diff line Loading @@ -334,12 +334,12 @@ public class BluetoothOppUtility { return (info != null) ? info : BluetoothOppSendFileInfo.SEND_FILE_INFO_ERROR; } static void closeSendFileInfo(Uri uri) { if (D) Log.d(TAG, "closeSendFileInfo: uri=" + uri); BluetoothOppSendFileInfo info = sSendFileMap.remove(uri); if (info != null && info.mInputStream != null) { static void closeSendFileInfo(Uri uri, BluetoothOppSendFileInfo sendFileInfo) { if (D) Log.d(TAG, "closeSendFileInfo: uri=" + uri + "sendFileInfo: " + sendFileInfo); boolean removed = sSendFileMap.remove(uri, sendFileInfo); if (removed && sendFileInfo != null && sendFileInfo.mInputStream != null) { try { info.mInputStream.close(); sendFileInfo.mInputStream.close(); } catch (IOException ignored) { } } Loading Loading
src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -611,7 +611,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { } finally { try { // Close InputStream and remove SendFileInfo from map BluetoothOppUtility.closeSendFileInfo(mInfo.mUri); BluetoothOppUtility.closeSendFileInfo(mInfo.mUri, fileInfo); if (uiUpdateThread != null) { uiUpdateThread.interrupt (); Loading
src/com/android/bluetooth/opp/BluetoothOppService.java +1 −1 Original line number Diff line number Diff line Loading @@ -719,7 +719,7 @@ public class BluetoothOppService extends Service { if (sendFileInfo == null || sendFileInfo.mInputStream == null) { Log.e(TAG, "Can't open file for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); BluetoothOppUtility.closeSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri, sendFileInfo); return; } } Loading
src/com/android/bluetooth/opp/BluetoothOppTransfer.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch if (info.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { BluetoothOppSendFileInfo fileInfo = BluetoothOppUtility.getSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri); BluetoothOppUtility.closeSendFileInfo(info.mUri, fileInfo); if (fileInfo.mFileName != null) { updateValues.put(BluetoothShare.FILENAME_HINT, fileInfo.mFileName); updateValues.put(BluetoothShare.TOTAL_BYTES, fileInfo.mLength); Loading
src/com/android/bluetooth/opp/BluetoothOppUtility.java +5 −5 Original line number Diff line number Diff line Loading @@ -334,12 +334,12 @@ public class BluetoothOppUtility { return (info != null) ? info : BluetoothOppSendFileInfo.SEND_FILE_INFO_ERROR; } static void closeSendFileInfo(Uri uri) { if (D) Log.d(TAG, "closeSendFileInfo: uri=" + uri); BluetoothOppSendFileInfo info = sSendFileMap.remove(uri); if (info != null && info.mInputStream != null) { static void closeSendFileInfo(Uri uri, BluetoothOppSendFileInfo sendFileInfo) { if (D) Log.d(TAG, "closeSendFileInfo: uri=" + uri + "sendFileInfo: " + sendFileInfo); boolean removed = sSendFileMap.remove(uri, sendFileInfo); if (removed && sendFileInfo != null && sendFileInfo.mInputStream != null) { try { info.mInputStream.close(); sendFileInfo.mInputStream.close(); } catch (IOException ignored) { } } Loading