Switch to a less cpu intensive function to check if libsignal-client is available

This commit is contained in:
AsamK 2022-02-02 19:34:30 +01:00
parent 8c6b909365
commit 73d44ba3fe
2 changed files with 8 additions and 1 deletions

View file

@ -47,7 +47,10 @@ public class ServiceConfig {
public static boolean isSignalClientAvailable() {
try {
org.signal.client.internal.Native.DeviceTransfer_GeneratePrivateKey();
try {
org.signal.client.internal.Native.UuidCiphertext_CheckValidContents(new byte[0]);
} catch (IllegalArgumentException ignored) {
}
return true;
} catch (UnsatisfiedLinkError e) {
logger.warn("Failed to call libsignal-client: {}", e.getMessage());