Loading app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -63,13 +63,13 @@ public class DownloadPDFFile extends AsyncTask<String, Void, Object> { if (activity != null) { if (activity != null) { // Manage error // Manage error if (result == null) { if (result == null) { Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show(); } else if (result instanceof Integer) { } else if (result instanceof Integer) { Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_LONG).show(); } else if (result instanceof SSLException) { } else if (result instanceof SSLException) { Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_LONG).show(); } else if (result instanceof IOException) { } else if (result instanceof IOException) { Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show(); } else if (result instanceof File) { } else if (result instanceof File) { activity.saveFileAndDisplay((File) result); activity.saveFileAndDisplay((File) result); } } Loading app/src/main/res/values/strings.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -27,7 +27,7 @@ <string name="pick_file">Pick File</string> <string name="pick_file">Pick File</string> <string name="toast_pick_file_error">Unable to pick file. Check status of file manager.</string> <string name="toast_pick_file_error">Unable to pick file. Check status of file manager.</string> <string name="toast_http_code_error">Remote server responded with an error.</string> <string name="toast_http_code_error">Remote server responded with an error.</string> <string name="toast_io_exception">We can\'t load this page for some reason.</string> <string name="toast_generic_download_error">We couldn\'t download this file for some reason.</string> <string name="toast_ssl_error">Secure connection failed.</string> <string name="toast_ssl_error">Secure connection failed.</string> <string name="action_about">About</string> <string name="action_about">About</string> <string name="version">Version</string> <string name="version">Version</string> Loading Loading
app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -63,13 +63,13 @@ public class DownloadPDFFile extends AsyncTask<String, Void, Object> { if (activity != null) { if (activity != null) { // Manage error // Manage error if (result == null) { if (result == null) { Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show(); } else if (result instanceof Integer) { } else if (result instanceof Integer) { Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_LONG).show(); } else if (result instanceof SSLException) { } else if (result instanceof SSLException) { Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_LONG).show(); } else if (result instanceof IOException) { } else if (result instanceof IOException) { Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show(); } else if (result instanceof File) { } else if (result instanceof File) { activity.saveFileAndDisplay((File) result); activity.saveFileAndDisplay((File) result); } } Loading
app/src/main/res/values/strings.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -27,7 +27,7 @@ <string name="pick_file">Pick File</string> <string name="pick_file">Pick File</string> <string name="toast_pick_file_error">Unable to pick file. Check status of file manager.</string> <string name="toast_pick_file_error">Unable to pick file. Check status of file manager.</string> <string name="toast_http_code_error">Remote server responded with an error.</string> <string name="toast_http_code_error">Remote server responded with an error.</string> <string name="toast_io_exception">We can\'t load this page for some reason.</string> <string name="toast_generic_download_error">We couldn\'t download this file for some reason.</string> <string name="toast_ssl_error">Secure connection failed.</string> <string name="toast_ssl_error">Secure connection failed.</string> <string name="action_about">About</string> <string name="action_about">About</string> <string name="version">Version</string> <string name="version">Version</string> Loading