Skip to content

Commit

Permalink
simplify error string for error while opening PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed May 6, 2022
1 parent c6113df commit 1a3e816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/app/grapheneos/pdfviewer/PdfViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceReque
try {
mInputStream = getContentResolver().openInputStream(mUri);
} catch (FileNotFoundException ignored) {
snackbar.setText(R.string.io_error).show();
snackbar.setText(R.string.error_while_opening).show();
}
return new WebResourceResponse("application/pdf", null, mInputStream);
}
Expand Down Expand Up @@ -471,7 +471,7 @@ private void loadPdf() {
}
mInputStream = getContentResolver().openInputStream(mUri);
} catch (IOException e) {
snackbar.setText(R.string.io_error).show();
snackbar.setText(R.string.error_while_opening).show();
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<string name="invalid_mime_type">Cannot open file with invalid MIME type</string>
<string name="legacy_file_uri">Cannot open legacy file paths from insecure apps</string>
<string name="io_error">Received I/O error trying to open content</string>
<string name="error_while_opening">Error encountered trying to open content</string>
<string name="error_while_saving">Error encountered while saving</string>

<string name="webview_out_of_date_title">WebView out-of-date</string>
Expand Down

0 comments on commit 1a3e816

Please sign in to comment.