Bump libsignal to v0.67.0.

Enables new CDSI connection logic based on remote config.
This commit is contained in:
andrew-signal
2025-02-25 18:31:20 -05:00
committed by Greyson Parrelli
parent b6038f8ae3
commit a31ed28b5f
6 changed files with 26 additions and 16 deletions

View File

@@ -96,7 +96,8 @@ object ContactDiscoveryRefreshV2 {
SignalDatabase.recipients.getAllServiceIdProfileKeyPairs(), SignalDatabase.recipients.getAllServiceIdProfileKeyPairs(),
Optional.empty(), Optional.empty(),
10_000, 10_000,
AppDependencies.libsignalNetwork AppDependencies.libsignalNetwork,
RemoteConfig.libsignalRouteBasedCDSILookup
) { ) {
Log.i(TAG, "Ignoring token for one-off lookup.") Log.i(TAG, "Ignoring token for one-off lookup.")
} }
@@ -160,7 +161,8 @@ object ContactDiscoveryRefreshV2 {
SignalDatabase.recipients.getAllServiceIdProfileKeyPairs(), SignalDatabase.recipients.getAllServiceIdProfileKeyPairs(),
Optional.ofNullable(token), Optional.ofNullable(token),
timeoutMs, timeoutMs,
AppDependencies.libsignalNetwork AppDependencies.libsignalNetwork,
RemoteConfig.libsignalRouteBasedCDSILookup
) { tokenToSave -> ) { tokenToSave ->
stopwatch.split("network-pre-token") stopwatch.split("network-pre-token")
if (!isPartialRefresh) { if (!isPartialRefresh) {

View File

@@ -1134,5 +1134,12 @@ object RemoteConfig {
hotSwappable = true hotSwappable = true
) )
/** Whether or not libsignal-net's CDSI lookups use the new route-based internals or the old ones */
val libsignalRouteBasedCDSILookup: Boolean by remoteBoolean(
key = "android.libsignal.libsignalRouteBasedCDSILookup",
defaultValue = true,
hotSwappable = true
)
// endregion // endregion
} }

View File

@@ -13,7 +13,7 @@ androidx-window = "1.3.0"
glide = "4.15.1" glide = "4.15.1"
gradle = "8.7.3" gradle = "8.7.3"
kotlin = "2.1.0" kotlin = "2.1.0"
libsignal-client = "0.66.2" libsignal-client = "0.67.0"
mp4parser = "1.9.39" mp4parser = "1.9.39"
android-gradle-plugin = "8.7.2" android-gradle-plugin = "8.7.2"
accompanist = "0.28.0" accompanist = "0.28.0"

View File

@@ -6604,20 +6604,20 @@ https://docs.gradle.org/current/userguide/dependency_verification.html
<sha256 value="6eb4422e8a618b3b76cb2096a3619d251f9e27989dc68307a1e5414c3710f2d1" origin="Generated by Gradle"/> <sha256 value="6eb4422e8a618b3b76cb2096a3619d251f9e27989dc68307a1e5414c3710f2d1" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.signal" name="libsignal-android" version="0.66.2"> <component group="org.signal" name="libsignal-android" version="0.67.0">
<artifact name="libsignal-android-0.66.2.aar"> <artifact name="libsignal-android-0.67.0.aar">
<sha256 value="1a3053ed5cc1d9a3408abaf27926a058925c2b1b5a80ac1dd29f6f1465beaf33" origin="Generated by Gradle"/> <sha256 value="b2547a4edae8274d0e90d52b5c2880ecd8d24386b44ac0365753c4aff8ad6942" origin="Generated by Gradle"/>
</artifact> </artifact>
<artifact name="libsignal-android-0.66.2.module"> <artifact name="libsignal-android-0.67.0.module">
<sha256 value="775f06f61145232e219faf47fa74d0c6eb7490211eaf78c62fd360f0d4a8c9af" origin="Generated by Gradle"/> <sha256 value="b25c8043f8f78bbc942a7ae62d8a74e24c38ed2928a52a43abe2f2462c22f1a8" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.signal" name="libsignal-client" version="0.66.2"> <component group="org.signal" name="libsignal-client" version="0.67.0">
<artifact name="libsignal-client-0.66.2.jar"> <artifact name="libsignal-client-0.67.0.jar">
<sha256 value="c69628b306573257a216c007f6f3458cb2c6f05058cbf4eec24cfd3d3544511e" origin="Generated by Gradle"/> <sha256 value="2d9f416971b09e1ab704ae01198db3ce8831f23f8fb2c3331b83db21d8816b83" origin="Generated by Gradle"/>
</artifact> </artifact>
<artifact name="libsignal-client-0.66.2.module"> <artifact name="libsignal-client-0.67.0.module">
<sha256 value="573cbc4651e244c5480fa78b574551fedb62bd1d337599aab9df0d6cfcc94bc2" origin="Generated by Gradle"/> <sha256 value="3fc85b3fd68d6c6148f200de751f474601323986159b78145cc088288b597d16" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.signal" name="ringrtc-android" version="2.50.0"> <component group="org.signal" name="ringrtc-android" version="2.50.0">

View File

@@ -221,11 +221,12 @@ public class SignalServiceAccountManager {
Optional<byte[]> token, Optional<byte[]> token,
Long timeoutMs, Long timeoutMs,
@Nonnull Network libsignalNetwork, @Nonnull Network libsignalNetwork,
boolean useLibsignalRouteBasedCDSIConnectionLogic,
Consumer<byte[]> tokenSaver) Consumer<byte[]> tokenSaver)
throws IOException throws IOException
{ {
CdsiAuthResponse auth = pushServiceSocket.getCdsiAuth(); CdsiAuthResponse auth = pushServiceSocket.getCdsiAuth();
CdsiV2Service service = new CdsiV2Service(libsignalNetwork); CdsiV2Service service = new CdsiV2Service(libsignalNetwork, useLibsignalRouteBasedCDSIConnectionLogic);
CdsiV2Service.Request request = new CdsiV2Service.Request(previousE164s, newE164s, serviceIds, token); CdsiV2Service.Request request = new CdsiV2Service.Request(previousE164s, newE164s, serviceIds, token);
Single<ServiceResponse<CdsiV2Service.Response>> single = service.getRegisteredUsers(auth.getUsername(), auth.getPassword(), request, tokenSaver); Single<ServiceResponse<CdsiV2Service.Response>> single = service.getRegisteredUsers(auth.getUsername(), auth.getPassword(), request, tokenSaver);

View File

@@ -53,10 +53,10 @@ public final class CdsiV2Service {
private final CdsiRequestHandler cdsiRequestHandler; private final CdsiRequestHandler cdsiRequestHandler;
public CdsiV2Service(@Nonnull Network network) { public CdsiV2Service(@Nonnull Network network, boolean useLibsignalRouteBasedCDSIConnectionLogic) {
this.cdsiRequestHandler = (username, password, request, tokenSaver) -> { this.cdsiRequestHandler = (username, password, request, tokenSaver) -> {
try { try {
Future<CdsiLookupResponse> cdsiRequest = network.cdsiLookup(username, password, buildLibsignalRequest(request), tokenSaver); Future<CdsiLookupResponse> cdsiRequest = network.cdsiLookup(username, password, buildLibsignalRequest(request), tokenSaver, useLibsignalRouteBasedCDSIConnectionLogic);
return Single.fromFuture(cdsiRequest) return Single.fromFuture(cdsiRequest)
.onErrorResumeNext((Throwable err) -> { .onErrorResumeNext((Throwable err) -> {
if (err instanceof ExecutionException && err.getCause() != null) { if (err instanceof ExecutionException && err.getCause() != null) {