mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-26 07:30:16 +00:00
Update okhttp and support for transmitting messages over websocket
// FREEBIE
This commit is contained in:
@@ -4,6 +4,7 @@ import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
@@ -44,6 +45,8 @@ public class MessageRetrievalService extends Service implements Runnable, Inject
|
||||
private int activeActivities = 0;
|
||||
private List<Intent> pushPending = new LinkedList<>();
|
||||
|
||||
public static SignalServiceMessagePipe pipe = null;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -73,7 +76,7 @@ public class MessageRetrievalService extends Service implements Runnable, Inject
|
||||
waitForConnectionNecessary();
|
||||
|
||||
Log.w(TAG, "Making websocket connection....");
|
||||
SignalServiceMessagePipe pipe = receiver.createMessagePipe();
|
||||
pipe = receiver.createMessagePipe();
|
||||
|
||||
try {
|
||||
while (isConnectionNecessary()) {
|
||||
@@ -181,4 +184,8 @@ public class MessageRetrievalService extends Service implements Runnable, Inject
|
||||
intent.setAction(MessageRetrievalService.ACTION_ACTIVITY_FINISHED);
|
||||
activity.startService(intent);
|
||||
}
|
||||
|
||||
public static @Nullable SignalServiceMessagePipe getPipe() {
|
||||
return pipe;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user