Loading android/app/src/com/android/bluetooth/opp/BluetoothOppService.java +11 −3 Original line number Diff line number Diff line Loading @@ -571,13 +571,21 @@ public class BluetoothOppService extends Service { if (info.isReadyToStart()) { if (info.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { /* check if the file exists */ InputStream i; try { InputStream i = getContentResolver().openInputStream(Uri.parse(info.mUri)); i.close(); i = getContentResolver().openInputStream(Uri.parse(info.mUri)); } catch (FileNotFoundException e) { Log.e(TAG, "Can't open file for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); return; } catch (SecurityException e) { Log.e(TAG, "Exception:" + e.toString() + " for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); return; } try { i.close(); } catch (IOException ex) { Log.e(TAG, "IO error when close file for OUTBOUND info " + info.mId); return; Loading Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppService.java +11 −3 Original line number Diff line number Diff line Loading @@ -571,13 +571,21 @@ public class BluetoothOppService extends Service { if (info.isReadyToStart()) { if (info.mDirection == BluetoothShare.DIRECTION_OUTBOUND) { /* check if the file exists */ InputStream i; try { InputStream i = getContentResolver().openInputStream(Uri.parse(info.mUri)); i.close(); i = getContentResolver().openInputStream(Uri.parse(info.mUri)); } catch (FileNotFoundException e) { Log.e(TAG, "Can't open file for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); return; } catch (SecurityException e) { Log.e(TAG, "Exception:" + e.toString() + " for OUTBOUND info " + info.mId); Constants.updateShareStatus(this, info.mId, BluetoothShare.STATUS_BAD_REQUEST); return; } try { i.close(); } catch (IOException ex) { Log.e(TAG, "IO error when close file for OUTBOUND info " + info.mId); return; Loading