mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Switch to a less cpu intensive function to check if libsignal-client is available
This commit is contained in:
parent
8c6b909365
commit
73d44ba3fe
2 changed files with 8 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue