|
@@ -1,12 +1,15 @@
|
|
|
package org.cryptomator.keychain;
|
|
|
|
|
|
+import org.apache.commons.lang3.SystemUtils;
|
|
|
+
|
|
|
import java.util.Optional;
|
|
|
|
|
|
public class LinuxKeychainTester {
|
|
|
+
|
|
|
public static boolean secretServiceIsAvailable() {
|
|
|
try {
|
|
|
Class.forName("org.freedesktop.secret.simple.SimpleCollection");
|
|
|
- return true;
|
|
|
+ return SystemUtils.IS_OS_LINUX; // even if the classes could be loaded, secretService is only available on linux
|
|
|
} catch (ClassNotFoundException e) {
|
|
|
return false;
|
|
|
}
|