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

Method reportEmptyMessage

app/src/main/java/eu/faircode/email/Core.java:5711–5740  ·  view source on GitHub ↗
(Context context, State state, EntityAccount account, IMAPStore istore)

Source from the content-addressed store, hash-verified

5709 }
5710
5711 private static void reportEmptyMessage(Context context, State state, EntityAccount account, IMAPStore istore) {
5712 try {
5713 if (istore.hasCapability("ID")) {
5714 Map<String, String> id = new LinkedHashMap<>();
5715 id.put("name", context.getString(R.string.app_name));
5716 id.put("version", BuildConfig.VERSION_NAME);
5717 Map<String, String> sid = istore.id(id);
5718 if (sid != null) {
5719 StringBuilder sb = new StringBuilder();
5720 for (String key : sid.keySet())
5721 sb.append(" ").append(key).append("=").append(sid.get(key));
5722 if (!account.partial_fetch)
5723 Log.w("Empty message" + sb.toString());
5724 }
5725 } else {
5726 if (!account.partial_fetch)
5727 Log.w("Empty message " + account.host);
5728 }
5729 } catch (Throwable ex) {
5730 Log.w(ex);
5731 }
5732
5733 // Auto disable partial fetch
5734 if (account.partial_fetch && false) {
5735 account.partial_fetch = false;
5736 DB db = DB.getInstance(context);
5737 db.account().setAccountPartialFetch(account.id, account.partial_fetch);
5738 state.error(new StoreClosedException(istore));
5739 }
5740 }
5741
5742 // FolderClosedException: can happen when no connectivity
5743

Callers 2

synchronizeMessageMethod · 0.95
downloadMessageMethod · 0.95

Calls 12

wMethod · 0.95
getInstanceMethod · 0.95
accountMethod · 0.95
hasCapabilityMethod · 0.45
putMethod · 0.45
getStringMethod · 0.45
idMethod · 0.45
appendMethod · 0.45
getMethod · 0.45
toStringMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected