(Context context, State state, EntityAccount account, IMAPStore istore)
| 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 |
no test coverage detected