Skip to content

Commit

Permalink
SiVa warning improvements
Browse files Browse the repository at this point in the history
* MOPPAND-822
  • Loading branch information
martenrebane committed Nov 26, 2021
1 parent f3c3302 commit 500a83f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract class DocumentViewIntent implements Intent, Action {
static DocumentViewIntent confirmation(File containerFile, DataFile document) {
String containerFileExtension = getFileExtension(containerFile.getName()).toLowerCase(Locale.US);
String documentFileExtension = getFileExtension(document.name()).toLowerCase(Locale.US);
if (!containerFileExtension.equals("pdf") && !documentFileExtension.equals("pdf") && SignedContainer.isContainer(containerFile)) {
if (!containerFileExtension.equals("pdf") && SignedContainer.isContainer(containerFile)) {
boolean isConfirmationNeeded;
try {
SignedContainer signedContainer = SignedContainer.open(containerFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,11 @@ final class Processor implements ObservableTransformer<Action, Result> {
.observeOn(AndroidSchedulers.mainThread())
.map(documentFile -> {
Transaction transaction;
String containerFileExtension = getFileExtension(containerFile.getName()).toLowerCase(Locale.US);
String documentFileExtension = getFileExtension(documentFile.getName()).toLowerCase(Locale.US);
boolean isSignedPdfDataFile =
boolean isPdfInSignedPdfContainer = containerFileExtension.equals("pdf") &&
(SivaUtil.isSivaConfirmationNeeded(ImmutableList.of(FileStream.create(documentFile))) && documentFileExtension.equals("pdf"));
if (!isSignedPdfDataFile && SignedContainer.isContainer(documentFile)) {
if (!isPdfInSignedPdfContainer && SignedContainer.isContainer(documentFile)) {
transaction = Transaction.push(SignatureUpdateScreen
.create(true, true, documentFile, false, false));
} else if (CryptoContainer.isContainerFileName(documentFile.getName())) {
Expand Down

0 comments on commit 500a83f

Please sign in to comment.