MCPcopy Create free account
hub / github.com/M66B/FairEmail / onExecute

Method onExecute

app/src/main/java/eu/faircode/email/ActivityDSN.java:100–119  ·  view source on GitHub ↗
(Context context, Bundle args)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 6

checkMethod · 0.95
copyMethod · 0.95
decodeMimeMethod · 0.95
highlightHeadersMethod · 0.95
toStringMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected