Commit e85fbfb9 authored by Torsten Grote's avatar Torsten Grote

[android] close InputStream with new IoUtils method

parent 80ee35d9
......@@ -44,6 +44,7 @@ import javax.inject.Inject;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.bramble.util.IoUtils.tryToClose;
import static org.briarproject.bramble.util.LogUtils.logDuration;
import static org.briarproject.bramble.util.LogUtils.logException;
import static org.briarproject.bramble.util.LogUtils.now;
......@@ -197,13 +198,7 @@ public class ConversationViewModel extends AndroidViewModel {
logException(LOG, WARNING, e);
return null;
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
logException(LOG, WARNING, e);
}
}
if (is != null) tryToClose(is, LOG, WARNING);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment