aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/persistance
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-09-03 19:50:42 +0200
committerChristian Schneppe <christian@pix-art.de>2019-09-03 19:50:42 +0200
commit71e4bcf9cb807e2f3954a5e968a44a409aaeebd7 (patch)
treee1f92e73467a3c5cad8da7943fbc8dbf0eb1f6be /src/main/java/de/pixart/messenger/persistance
parentedcfdb974dc544c0e79e457f50c12e5942619251 (diff)
bare minimum direct connections
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index 063ff50a0..962496dcb 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -41,6 +41,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
+import java.net.ServerSocket;
import java.net.Socket;
import java.net.URL;
import java.security.DigestOutputStream;
@@ -1369,6 +1370,14 @@ public class FileBackend {
}
}
+ public static void close(final ServerSocket socket) {
+ if (socket != null) {
+ try {
+ socket.close();
+ } catch (IOException e) {
+ }
+ }
+ }
public static boolean weOwnFile(Context context, Uri uri) {
if (uri == null || !ContentResolver.SCHEME_FILE.equals(uri.getScheme())) {