Loading app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java +4 −4 Original line number Diff line number Diff line Loading @@ -63,13 +63,13 @@ public class DownloadPDFFile extends AsyncTask<String, Void, Object> { if (activity != null) { // Manage error if (result == null) { Toast.makeText(activity.getApplicationContext(), R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); } else if (result instanceof Integer) { Toast.makeText(activity.getApplicationContext(), R.string.toast_http_code_error + String.valueOf(result), Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_SHORT).show(); } else if (result instanceof SSLException) { Toast.makeText(activity.getApplicationContext(), R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); } else if (result instanceof IOException) { Toast.makeText(activity.getApplicationContext(), R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); } else if (result instanceof File) { activity.saveFileAndDisplay((File) result); } Loading app/src/main/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ <string name="app_name" translatable="false">Pdf Viewer Plus</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_http_code_error">Problem loading page, http error code : </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_ssl_error">Secure connection failed.</string> <string name="action_about">About</string> Loading Loading
app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java +4 −4 Original line number Diff line number Diff line Loading @@ -63,13 +63,13 @@ public class DownloadPDFFile extends AsyncTask<String, Void, Object> { if (activity != null) { // Manage error if (result == null) { Toast.makeText(activity.getApplicationContext(), R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); } else if (result instanceof Integer) { Toast.makeText(activity.getApplicationContext(), R.string.toast_http_code_error + String.valueOf(result), Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_SHORT).show(); } else if (result instanceof SSLException) { Toast.makeText(activity.getApplicationContext(), R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_SHORT).show(); } else if (result instanceof IOException) { Toast.makeText(activity.getApplicationContext(), R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.toast_io_exception, Toast.LENGTH_SHORT).show(); } else if (result instanceof File) { activity.saveFileAndDisplay((File) result); } Loading
app/src/main/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ <string name="app_name" translatable="false">Pdf Viewer Plus</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_http_code_error">Problem loading page, http error code : </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_ssl_error">Secure connection failed.</string> <string name="action_about">About</string> Loading