mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-04 15:35:38 +01:00
Remove all remaining usages of annimon.stream.
This commit is contained in:
committed by
jeffrey-signal
parent
7f6e96a522
commit
82df20190d
+3
-4
@@ -4,8 +4,7 @@ import android.util.LongSparseArray;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.ringrtc.CallException;
|
||||
@@ -193,8 +192,8 @@ public class GroupActionProcessor extends DeviceAwareActionProcessor {
|
||||
Recipient group = currentState.getCallInfoState().getCallRecipient();
|
||||
GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();
|
||||
|
||||
List<GroupCall.GroupMemberInfo> members = Stream.of(GroupManager.getUuidCipherTexts(context, group.requireGroupId().requireV2()))
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(Collectors.toList());
|
||||
List<GroupCall.GroupMemberInfo> members = GroupManager.getUuidCipherTexts(context, group.requireGroupId().requireV2()).entrySet().stream()
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(Collectors.toList());
|
||||
|
||||
try {
|
||||
groupCall.setGroupMembers(new ArrayList<>(members));
|
||||
|
||||
+4
-6
@@ -6,8 +6,7 @@ import android.util.LongSparseArray;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.ringrtc.CallException;
|
||||
@@ -22,7 +21,6 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.ringrtc.Camera;
|
||||
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.CallInfoState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcEphemeralState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceStateBuilder;
|
||||
@@ -254,9 +252,9 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
|
||||
String eraId = WebRtcUtil.getGroupCallEraId(groupCall);
|
||||
webRtcInteractor.sendGroupCallMessage(currentState.getCallInfoState().getCallRecipient(), eraId, null, false, false);
|
||||
|
||||
List<UUID> members = Stream.of(currentState.getCallInfoState().getRemoteCallParticipants())
|
||||
.filter(p -> p.getRecipient().getHasServiceId())
|
||||
.map(p -> p.getRecipient().requireServiceId().getRawUuid()).collect(Collectors.toList());
|
||||
List<UUID> members = currentState.getCallInfoState().getRemoteCallParticipants().stream()
|
||||
.filter(p -> p.getRecipient().getHasServiceId())
|
||||
.map(p -> p.getRecipient().requireServiceId().getRawUuid()).collect(Collectors.toList());
|
||||
webRtcInteractor.updateGroupCallUpdateMessage(currentState.getCallInfoState().getCallRecipient().getId(), eraId, members, false);
|
||||
|
||||
currentState = currentState.builder()
|
||||
|
||||
+3
-4
@@ -5,8 +5,7 @@ import android.os.ResultReceiver;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.ringrtc.CallException;
|
||||
@@ -144,8 +143,8 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
|
||||
return currentState;
|
||||
}
|
||||
|
||||
List<Recipient> callParticipants = Stream.of(peekInfo.getJoinedMembers())
|
||||
.map(uuid -> Recipient.externalPush(ACI.from(uuid))).collect(Collectors.toList());
|
||||
List<Recipient> callParticipants = peekInfo.getJoinedMembers().stream()
|
||||
.map(uuid -> Recipient.externalPush(ACI.from(uuid))).collect(Collectors.toList());
|
||||
|
||||
WebRtcServiceStateBuilder.CallInfoStateBuilder builder = currentState.builder()
|
||||
.changeCallInfoState()
|
||||
|
||||
@@ -11,8 +11,6 @@ import androidx.annotation.AnyThread;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.signal.core.models.ServiceId.ACI;
|
||||
import org.signal.core.util.Util;
|
||||
@@ -481,8 +479,8 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
GroupId.V2 groupId = group.requireGroupId().requireV2();
|
||||
ExternalGroupCredential credential = GroupManager.getExternalGroupCredential(context, groupId);
|
||||
|
||||
List<GroupCall.GroupMemberInfo> members = Stream.of(GroupManager.getUuidCipherTexts(context, groupId))
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(com.annimon.stream.Collectors.toList());
|
||||
List<GroupCall.GroupMemberInfo> members = GroupManager.getUuidCipherTexts(context, groupId).entrySet().stream()
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(Collectors.toList());
|
||||
callManager.peekGroupCall(SignalStore.internal().getGroupCallingServer(), credential.token.getBytes(Charsets.UTF_8), members, peekInfo -> {
|
||||
Long threadId = SignalDatabase.threads().getThreadIdFor(group.getId());
|
||||
|
||||
@@ -959,8 +957,8 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
SignalExecutors.BOUNDED_IO.execute(() -> {
|
||||
List<Pair<String, String>> headerPairs;
|
||||
if (headers != null) {
|
||||
headerPairs = Stream.of(headers)
|
||||
.map(header -> new Pair<>(header.getName(), header.getValue())).collect(com.annimon.stream.Collectors.toList());
|
||||
headerPairs = headers.stream()
|
||||
.map(header -> new Pair<>(header.getName(), header.getValue())).collect(Collectors.toList());
|
||||
} else {
|
||||
headerPairs = Collections.emptyList();
|
||||
}
|
||||
|
||||
+4
-4
@@ -6,8 +6,7 @@ import android.os.ResultReceiver;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.libsignal.protocol.IdentityKey;
|
||||
@@ -534,8 +533,9 @@ public abstract class WebRtcActionProcessor {
|
||||
protected final @NonNull WebRtcServiceState handleSendIceCandidates(@NonNull WebRtcServiceState currentState, @NonNull CallMetadata callMetadata, boolean broadcast, @NonNull List<byte[]> iceCandidates) {
|
||||
Log.i(tag, "handleSendIceCandidates(): id: " + callMetadata.getCallId().format(callMetadata.getRemoteDevice()));
|
||||
|
||||
List<IceUpdateMessage> iceUpdateMessages = Stream.of(iceCandidates)
|
||||
.map(c -> new IceUpdateMessage(callMetadata.getCallId().longValue(), c)).collect(Collectors.toList());
|
||||
List<IceUpdateMessage> iceUpdateMessages = iceCandidates.stream()
|
||||
.map(c -> new IceUpdateMessage(callMetadata.getCallId().longValue(), c))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Integer destinationDeviceId = broadcast ? null : callMetadata.getRemoteDevice();
|
||||
SignalServiceCallMessage callMessage = SignalServiceCallMessage.forIceUpdates(iceUpdateMessages, destinationDeviceId);
|
||||
|
||||
Reference in New Issue
Block a user