mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Add internal preferences under Advanced behind feature flag.
Initially for GV2 testing.
This commit is contained in:
committed by
Greyson Parrelli
parent
545ba80697
commit
e6a0e5b858
@@ -5,7 +5,9 @@ import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -39,6 +41,21 @@ public final class GroupCandidate {
|
||||
return profileKeyCredential.isPresent();
|
||||
}
|
||||
|
||||
public static Set<GroupCandidate> withoutProfileKeyCredentials(Set<GroupCandidate> groupCandidates) {
|
||||
HashSet<GroupCandidate> result = new HashSet<>(groupCandidates.size());
|
||||
|
||||
for (GroupCandidate candidate: groupCandidates) {
|
||||
result.add(candidate.withoutProfileKeyCredential());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public GroupCandidate withoutProfileKeyCredential() {
|
||||
return hasProfileKeyCredential() ? new GroupCandidate(uuid, Optional.absent())
|
||||
: this;
|
||||
}
|
||||
|
||||
public GroupCandidate withProfileKeyCredential(ProfileKeyCredential profileKeyCredential) {
|
||||
return new GroupCandidate(uuid, Optional.of(profileKeyCredential));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user