(Context context, IMAPFolder ifolder, List<Long> uids)
| 5420 | } |
| 5421 | |
| 5422 | private static void uidExpunge(Context context, IMAPFolder ifolder, List<Long> uids) throws MessagingException { |
| 5423 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); |
| 5424 | int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE); |
| 5425 | |
| 5426 | ifolder.doCommand(new IMAPFolder.ProtocolCommand() { |
| 5427 | @Override |
| 5428 | public Object doCommand(IMAPProtocol protocol) throws ProtocolException { |
| 5429 | // https://datatracker.ietf.org/doc/html/rfc4315#section-2.1 |
| 5430 | for (List<Long> list : Helper.chunkList(uids, chunk_size)) |
| 5431 | protocol.uidexpunge(UIDSet.createUIDSets(Helper.toLongArray(list))); |
| 5432 | return null; |
| 5433 | } |
| 5434 | }); |
| 5435 | } |
| 5436 | |
| 5437 | static EntityIdentity matchIdentity(Context context, EntityFolder folder, EntityMessage message) { |
| 5438 | if (EntityFolder.DRAFTS.equals(folder.type)) |
no test coverage detected