Allow using a proxy during registration.

This commit is contained in:
Greyson Parrelli
2021-02-02 19:56:50 -05:00
parent 46344776a4
commit 30563ed3e5
10 changed files with 130 additions and 42 deletions

View File

@@ -17,6 +17,7 @@ import androidx.lifecycle.DefaultLifecycleObserver;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ProcessLifecycleOwner;
import org.signal.core.util.concurrent.SignalExecutors;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
@@ -160,10 +161,12 @@ public class IncomingMessageObserver {
}
}
public void terminate() {
Log.w(TAG, "Beginning termination.");
terminated = true;
shutdown(pipe, unidentifiedPipe);
public void terminateAsync() {
SignalExecutors.BOUNDED.execute(() -> {
Log.w(TAG, "Beginning termination.");
terminated = true;
shutdown(pipe, unidentifiedPipe);
});
}
private void shutdown(@Nullable SignalServiceMessagePipe pipe, @Nullable SignalServiceMessagePipe unidentifiedPipe) {