From 221eb194d94b6639d97a5814fe9da5b560bf3d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 5 Nov 2017 22:59:11 +0100 Subject: [PATCH] Merge SUPPORTED_PUT_KEY and SUPPORTED_RESET --- .../keychain/securitytoken/SecurityTokenInfo.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/securitytoken/SecurityTokenInfo.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/securitytoken/SecurityTokenInfo.java index 99173cc00..e987b2d78 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/securitytoken/SecurityTokenInfo.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/securitytoken/SecurityTokenInfo.java @@ -110,14 +110,7 @@ public abstract class SecurityTokenInfo implements Parcelable { TokenType.GNUK_1_25_AND_NEWER )); - private static final HashSet SUPPORTED_USB_RESET = new HashSet<>(Arrays.asList( - TokenType.YUBIKEY_NEO, - TokenType.YUBIKEY_4, - TokenType.NITROKEY_PRO, - TokenType.GNUK_1_25_AND_NEWER - )); - - private static final HashSet SUPPORTED_USB_PUT_KEY = new HashSet<>(Arrays.asList( + private static final HashSet SUPPORTED_USB_SETUP = new HashSet<>(Arrays.asList( TokenType.YUBIKEY_NEO, TokenType.YUBIKEY_4, // Not clear, will be tested: https://github.com/open-keychain/open-keychain/issues/2069 TokenType.NITROKEY_PRO, @@ -132,14 +125,14 @@ public abstract class SecurityTokenInfo implements Parcelable { } public boolean isPutKeySupported() { - boolean isKnownSupported = SUPPORTED_USB_PUT_KEY.contains(getTokenType()); + boolean isKnownSupported = SUPPORTED_USB_SETUP.contains(getTokenType()); boolean isNfcTransport = getTransportType() == TransportType.NFC; return isKnownSupported || isNfcTransport; } public boolean isResetSupported() { - boolean isKnownSupported = SUPPORTED_USB_RESET.contains(getTokenType()); + boolean isKnownSupported = SUPPORTED_USB_SETUP.contains(getTokenType()); boolean isNfcTransport = getTransportType() == TransportType.NFC; boolean hasLifeCycleManagement = hasLifeCycleManagement();