mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Keep old device inactive after a successful transfer.
This commit is contained in:
committed by
Greyson Parrelli
parent
31e3e37c9b
commit
45178b3eb3
@@ -4,6 +4,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -21,12 +22,16 @@ public final class DeviceTransferBlockingInterceptor implements Interceptor {
|
||||
|
||||
private static final DeviceTransferBlockingInterceptor INSTANCE = new DeviceTransferBlockingInterceptor();
|
||||
|
||||
private volatile boolean blockNetworking = false;
|
||||
private volatile boolean blockNetworking;
|
||||
|
||||
public static DeviceTransferBlockingInterceptor getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public DeviceTransferBlockingInterceptor() {
|
||||
this.blockNetworking = SignalStore.misc().isOldDeviceTransferLocked();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Response intercept(@NonNull Chain chain) throws IOException {
|
||||
if (!blockNetworking) {
|
||||
|
||||
Reference in New Issue
Block a user