diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-08-22 21:30:36 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-08-22 21:30:36 +0200 |
commit | 3ed7cb54e5858afaadc3f7ec5bc01edb61e1428e (patch) | |
tree | 56013b55e801ec8f5de5aaea39fcdb203c40b15c /src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java | |
parent | 77d0c1110a8ae7a980f1c4420d719af803990da8 (diff) |
Basic filetransfer http delete implementation; Exceptions for IqPacketError added
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java index 26854205..8f970a09 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java +++ b/src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java @@ -10,6 +10,7 @@ import java.io.File; import java.security.SecureRandom; import de.duenndns.ssl.MemorizingTrustManager; +import de.thedevstack.conversationsplus.http.HttpClient; import de.thedevstack.conversationsplus.http.HttpConnectionManager; import de.thedevstack.conversationsplus.persistance.FileBackend; import de.thedevstack.conversationsplus.services.filetransfer.FileTransferManager; @@ -18,6 +19,7 @@ import de.thedevstack.conversationsplus.services.filetransfer.jingle.JingleFileT import de.thedevstack.conversationsplus.utils.ImageUtil; import de.thedevstack.conversationsplus.utils.PRNGFixes; import de.thedevstack.conversationsplus.utils.SerialSingleThreadExecutor; +import okhttp3.OkHttpClient; /** * This class is used to provide static access to the applicationcontext. @@ -46,6 +48,7 @@ public class ConversationsPlusApplication extends Application { FileBackend.init(); FileTransferManager.init(new HttpUploadFileTransferService(), new JingleFileTransferService()); HttpConnectionManager.init(); + HttpClient.init(); } /** @@ -147,6 +150,11 @@ public class ConversationsPlusApplication extends Application { getInstance().setMemorizingTrustManager(tm); } + private static void initHttpClient() { + OkHttpClient client = new OkHttpClient.Builder() + .build(); + } + public static SecureRandom getSecureRandom() { return getInstance().secureRandom; } |