mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 04:25:18 +00:00
Update for core changes
This commit is contained in:
parent
ab68ae2e58
commit
26ba7fb387
@ -71,7 +71,6 @@ import org.webrtc.PeerConnectionFactory.InitializationOptions;
|
|||||||
import org.webrtc.voiceengine.WebRtcAudioManager;
|
import org.webrtc.voiceengine.WebRtcAudioManager;
|
||||||
import org.webrtc.voiceengine.WebRtcAudioUtils;
|
import org.webrtc.voiceengine.WebRtcAudioUtils;
|
||||||
import org.whispersystems.libsignal.logging.SignalProtocolLoggerProvider;
|
import org.whispersystems.libsignal.logging.SignalProtocolLoggerProvider;
|
||||||
import org.whispersystems.signalservice.loki.api.LokiAPI;
|
|
||||||
import org.whispersystems.signalservice.loki.api.LokiLongPoller;
|
import org.whispersystems.signalservice.loki.api.LokiLongPoller;
|
||||||
import org.whispersystems.signalservice.loki.api.LokiP2PAPI;
|
import org.whispersystems.signalservice.loki.api.LokiP2PAPI;
|
||||||
import org.whispersystems.signalservice.loki.api.LokiP2PAPIDelegate;
|
import org.whispersystems.signalservice.loki.api.LokiP2PAPIDelegate;
|
||||||
@ -153,7 +152,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
Log.i(TAG, "App is no longer visible.");
|
Log.i(TAG, "App is no longer visible.");
|
||||||
KeyCachingService.onAppBackgrounded(this);
|
KeyCachingService.onAppBackgrounded(this);
|
||||||
// Loki - Stop long polling if needed
|
// Loki - Stop long polling if needed
|
||||||
if (lokiLongPoller != null) { lokiLongPoller.stop(); }
|
if (lokiLongPoller != null) { lokiLongPoller.stopIfNeeded(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -387,7 +386,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
|
|
||||||
public void startLongPolling() {
|
public void startLongPolling() {
|
||||||
setUpLongPollingIfNeeded();
|
setUpLongPollingIfNeeded();
|
||||||
if (lokiLongPoller != null) { lokiLongPoller.startIfNecessary(); }
|
if (lokiLongPoller != null) { lokiLongPoller.startIfNeeded(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpLongPollingIfNeeded() {
|
private void setUpLongPollingIfNeeded() {
|
||||||
@ -395,8 +394,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
String hexEncodedPublicKey = TextSecurePreferences.getLocalNumber(this);
|
String hexEncodedPublicKey = TextSecurePreferences.getLocalNumber(this);
|
||||||
if (hexEncodedPublicKey == null) return;
|
if (hexEncodedPublicKey == null) return;
|
||||||
LokiAPIDatabase database = DatabaseFactory.getLokiAPIDatabase(this);
|
LokiAPIDatabase database = DatabaseFactory.getLokiAPIDatabase(this);
|
||||||
LokiAPI lokiAPI = new LokiAPI(hexEncodedPublicKey, database);
|
lokiLongPoller = new LokiLongPoller(hexEncodedPublicKey, database);
|
||||||
lokiLongPoller = new LokiLongPoller(hexEncodedPublicKey, lokiAPI);
|
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user