Support Nitrokey Start and Storage

This commit is contained in:
Dominik Schürmann
2017-11-06 13:17:55 +01:00
parent 106dbdf4a9
commit 9c1915423a
6 changed files with 18 additions and 11 deletions

View File

@@ -98,7 +98,7 @@ class ManageSecurityTokenContract {
void requestStoragePermission();
void showErrorCannotReset(boolean isGnuk);
void showErrorCannotReset(boolean isGnukOrNitrokeyStart);
void showErrorCannotUnlock();
}
}

View File

@@ -353,8 +353,8 @@ public class ManageSecurityTokenFragment extends Fragment implements ManageSecur
}
@Override
public void showErrorCannotReset(boolean isGnuk) {
if (isGnuk) {
public void showErrorCannotReset(boolean isGnukOrNitrokeyStart) {
if (isGnukOrNitrokeyStart) {
Notify.create(getActivity(), R.string.token_error_cannot_reset_gnuk_old, Style.ERROR).show();
} else {
Notify.create(getActivity(), R.string.token_error_cannot_reset, Style.ERROR).show();

View File

@@ -365,9 +365,9 @@ class ManageSecurityTokenPresenter implements ManageSecurityTokenMvpPresenter {
public void onClickResetToken() {
if (!tokenInfo.isResetSupported()) {
TokenType tokenType = tokenInfo.getTokenType();
boolean isGnuk = tokenType == TokenType.GNUK_OLD || tokenType == TokenType.GNUK_UNKNOWN;
boolean isGnukOrNitrokeyStart = tokenType == TokenType.GNUK_OLD || tokenType == TokenType.NITROKEY_START_OLD;
view.showErrorCannotReset(isGnuk);
view.showErrorCannotReset(isGnukOrNitrokeyStart);
return;
}