(Context context, Bundle args)
| 98 | } |
| 99 | |
| 100 | @Override |
| 101 | protected Spanned onExecute(Context context, Bundle args) throws Throwable { |
| 102 | Uri uri = args.getParcelable("uri"); |
| 103 | |
| 104 | NoStreamException.check(uri, context); |
| 105 | |
| 106 | ContentResolver resolver = context.getContentResolver(); |
| 107 | try (InputStream is = resolver.openInputStream(uri)) { |
| 108 | if (is == null) |
| 109 | throw new FileNotFoundException(uri.toString()); |
| 110 | |
| 111 | ByteArrayOutputStream bos = new ByteArrayOutputStream(); |
| 112 | Helper.copy(is, bos); |
| 113 | |
| 114 | String headers = bos.toString(StandardCharsets.UTF_8.name()); |
| 115 | headers = MessageHelper.decodeMime(headers); |
| 116 | return HtmlHelper.highlightHeaders(context, |
| 117 | null, null, null, headers, false, false); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | @Override |
| 122 | protected void onExecuted(Bundle args, Spanned result) { |
nothing calls this directly
no test coverage detected