Reverse order to initialize backend

The GNOME keyring feature was implemented first and we don't want to confuse users who used it before
This commit is contained in:
Ralph Plawetzki
2020-08-14 07:40:46 +02:00
parent b1c66b181d
commit 3bf2b499a7

View File

@@ -23,11 +23,11 @@ public class LinuxSystemKeychainAccess implements KeychainAccessStrategy {
}
private static Optional<KeychainAccessStrategy> constructKeychainAccess() {
try { // is kwallet or gnome-keyring installed?
Class<?> clazz = Class.forName("org.cryptomator.keychain.LinuxKDEWalletKeychainAccessImpl");
try { // is gnome-keyring or kwallet installed?
Class<?> clazz = Class.forName("org.cryptomator.keychain.LinuxSecretServiceKeychainAccessImpl");
KeychainAccessStrategy instance = (KeychainAccessStrategy) clazz.getDeclaredConstructor().newInstance();
if (instance.isSupported()) return Optional.of(instance);
clazz = Class.forName("org.cryptomator.keychain.LinuxSecretServiceKeychainAccessImpl");
clazz = Class.forName("org.cryptomator.keychain.LinuxKDEWalletKeychainAccessImpl");
instance = (KeychainAccessStrategy) clazz.getDeclaredConstructor().newInstance();
return Optional.of(instance);
} catch (Exception e) {