mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-04 07:25:25 +01:00
Convert all the toList calls to collect(Collectors.toList)
Resolves #14718
This commit is contained in:
committed by
jeffrey-signal
parent
e9cdf0368e
commit
086883e565
@@ -4,6 +4,7 @@ import android.util.LongSparseArray;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
@@ -193,8 +194,7 @@ public class GroupActionProcessor extends DeviceAwareActionProcessor {
|
||||
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()))
|
||||
.toList();
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(Collectors.toList());
|
||||
|
||||
try {
|
||||
groupCall.setGroupMembers(new ArrayList<>(members));
|
||||
|
||||
@@ -6,6 +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 org.signal.core.util.logging.Log;
|
||||
@@ -255,8 +256,7 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
|
||||
|
||||
List<UUID> members = Stream.of(currentState.getCallInfoState().getRemoteCallParticipants())
|
||||
.filter(p -> p.getRecipient().getHasServiceId())
|
||||
.map(p -> p.getRecipient().requireServiceId().getRawUuid())
|
||||
.toList();
|
||||
.map(p -> p.getRecipient().requireServiceId().getRawUuid()).collect(Collectors.toList());
|
||||
webRtcInteractor.updateGroupCallUpdateMessage(currentState.getCallInfoState().getCallRecipient().getId(), eraId, members, false);
|
||||
|
||||
currentState = currentState.builder()
|
||||
|
||||
@@ -5,6 +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 org.signal.core.util.logging.Log;
|
||||
@@ -144,8 +145,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
|
||||
}
|
||||
|
||||
List<Recipient> callParticipants = Stream.of(peekInfo.getJoinedMembers())
|
||||
.map(uuid -> Recipient.externalPush(ACI.from(uuid)))
|
||||
.toList();
|
||||
.map(uuid -> Recipient.externalPush(ACI.from(uuid))).collect(Collectors.toList());
|
||||
|
||||
WebRtcServiceStateBuilder.CallInfoStateBuilder builder = currentState.builder()
|
||||
.changeCallInfoState()
|
||||
|
||||
@@ -482,8 +482,7 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
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()))
|
||||
.toList();
|
||||
.map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(com.annimon.stream.Collectors.toList());
|
||||
callManager.peekGroupCall(SignalStore.internal().getGroupCallingServer(), credential.token.getBytes(Charsets.UTF_8), members, peekInfo -> {
|
||||
Long threadId = SignalDatabase.threads().getThreadIdFor(group.getId());
|
||||
|
||||
@@ -961,8 +960,7 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
List<Pair<String, String>> headerPairs;
|
||||
if (headers != null) {
|
||||
headerPairs = Stream.of(headers)
|
||||
.map(header -> new Pair<>(header.getName(), header.getValue()))
|
||||
.toList();
|
||||
.map(header -> new Pair<>(header.getName(), header.getValue())).collect(com.annimon.stream.Collectors.toList());
|
||||
} else {
|
||||
headerPairs = Collections.emptyList();
|
||||
}
|
||||
|
||||
@@ -6,6 +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 org.signal.core.util.logging.Log;
|
||||
@@ -534,8 +535,7 @@ public abstract class WebRtcActionProcessor {
|
||||
Log.i(tag, "handleSendIceCandidates(): id: " + callMetadata.getCallId().format(callMetadata.getRemoteDevice()));
|
||||
|
||||
List<IceUpdateMessage> iceUpdateMessages = Stream.of(iceCandidates)
|
||||
.map(c -> new IceUpdateMessage(callMetadata.getCallId().longValue(), c))
|
||||
.toList();
|
||||
.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