Merge pull request #2804 from Trogel/poll-read-only

Use read-only access for polling

Fixes #2772
This commit is contained in:
cketti 2017-10-03 19:14:50 +02:00 committed by GitHub
commit ae38b1896a
2 changed files with 2 additions and 2 deletions

View file

@ -801,11 +801,11 @@ public class MessagingController {
*/
Timber.v("SYNC: About to open remote folder %s", folder);
remoteFolder.open(Folder.OPEN_MODE_RW);
if (Expunge.EXPUNGE_ON_POLL == account.getExpungePolicy()) {
Timber.d("SYNC: Expunging folder %s:%s", account.getDescription(), folder);
remoteFolder.expunge();
}
remoteFolder.open(Folder.OPEN_MODE_RO);
}

View file

@ -661,7 +661,7 @@ public class MessagingControllerTest {
controller.synchronizeMailboxSynchronous(account, FOLDER_NAME, listener, null);
verify(remoteFolder).open(Folder.OPEN_MODE_RW);
verify(remoteFolder).open(Folder.OPEN_MODE_RO);
}
@Test