mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-23 17:28:40 +00:00
Turn MessageRetrievalService into IncomingMessageObserver.
Due to an Android P bug, we basically need to stop calling startService() in onResume()/onPause(). That means I had to turn MessageRetrieval service into a singlton instead of a service. I also moved the offending KeyCachingService calls into static methods that didn't have to start the service.
This commit is contained in:
@@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.dependencies.InjectableType;
|
||||
import org.thoughtcrime.securesms.jobmanager.JobParameters;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.service.MessageRetrievalService;
|
||||
import org.thoughtcrime.securesms.service.IncomingMessageObserver;
|
||||
import org.thoughtcrime.securesms.util.Base64;
|
||||
import org.thoughtcrime.securesms.util.IdentityUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
@@ -107,7 +107,7 @@ public class RetrieveProfileJob extends ContextJob implements InjectableType {
|
||||
}
|
||||
|
||||
private SignalServiceProfile retrieveProfile(@NonNull String number) throws IOException {
|
||||
SignalServiceMessagePipe pipe = MessageRetrievalService.getPipe();
|
||||
SignalServiceMessagePipe pipe = IncomingMessageObserver.getPipe();
|
||||
|
||||
if (pipe != null) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user