@Test public void stop_withoutStartBeingCalled_shouldNotCreateAnyImapFolderPushers() throws Exception { imapPusher.stop(); List<ImapFolderPusher> imapFolderPushers = imapPusher.getImapFolderPushers(); assertEquals(0, imapFolderPushers.size()); }
@Override public void stop() { if (K9MailLib.isDebug()) { Timber.i("Requested stop of IMAP pusher"); } synchronized (folderPushers) { for (ImapFolderPusher folderPusher : folderPushers) { try { if (K9MailLib.isDebug()) { Timber.i("Requesting stop of IMAP folderPusher %s", folderPusher.getId()); } folderPusher.stop(); } catch (Exception e) { Timber.e(e, "Got exception while stopping %s", folderPusher.getId()); } } folderPushers.clear(); } }
ImapPusher implements Pusher { @Override public void stop() { if (K9MailLib.isDebug()) { Timber.i("Requested stop of IMAP pusher"); } synchronized (folderPushers) { for (ImapFolderPusher folderPusher : folderPushers) { try { if (K9MailLib.isDebug()) { Timber.i("Requesting stop of IMAP folderPusher %s", folderPusher.getId()); } folderPusher.stop(); } catch (Exception e) { Timber.e(e, "Got exception while stopping %s", folderPusher.getId()); } } folderPushers.clear(); } } }
ImapPusher implements Pusher { @Override public void stop() { if (K9MailLib.isDebug()) { Timber.i("Requested stop of IMAP pusher"); } synchronized (folderPushers) { for (ImapFolderPusher folderPusher : folderPushers) { try { if (K9MailLib.isDebug()) { Timber.i("Requesting stop of IMAP folderPusher %s", folderPusher.getId()); } folderPusher.stop(); } catch (Exception e) { Timber.e(e, "Got exception while stopping %s", folderPusher.getId()); } } folderPushers.clear(); } } ImapPusher(ImapStore store, PushReceiver pushReceiver); }
ImapPusher implements Pusher { @Override public void stop() { if (K9MailLib.isDebug()) { Timber.i("Requested stop of IMAP pusher"); } synchronized (folderPushers) { for (ImapFolderPusher folderPusher : folderPushers) { try { if (K9MailLib.isDebug()) { Timber.i("Requesting stop of IMAP folderPusher %s", folderPusher.getId()); } folderPusher.stop(); } catch (Exception e) { Timber.e(e, "Got exception while stopping %s", folderPusher.getId()); } } folderPushers.clear(); } } ImapPusher(ImapStore store, PushReceiver pushReceiver); @Override void start(List<String> folderNames); @Override void refresh(); @Override void stop(); @Override int getRefreshInterval(); @Override long getLastRefresh(); @Override void setLastRefresh(long lastRefresh); }
ImapPusher implements Pusher { @Override public void stop() { if (K9MailLib.isDebug()) { Timber.i("Requested stop of IMAP pusher"); } synchronized (folderPushers) { for (ImapFolderPusher folderPusher : folderPushers) { try { if (K9MailLib.isDebug()) { Timber.i("Requesting stop of IMAP folderPusher %s", folderPusher.getId()); } folderPusher.stop(); } catch (Exception e) { Timber.e(e, "Got exception while stopping %s", folderPusher.getId()); } } folderPushers.clear(); } } ImapPusher(ImapStore store, PushReceiver pushReceiver); @Override void start(List<String> folderNames); @Override void refresh(); @Override void stop(); @Override int getRefreshInterval(); @Override long getLastRefresh(); @Override void setLastRefresh(long lastRefresh);  }