mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-23 16:25:30 +00:00
parent
acf3cfadd4
commit
e285cde0b3
2 changed files with 5 additions and 19 deletions
|
@ -25,7 +25,7 @@
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -52,12 +52,10 @@ import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.sun.mail.iap.ConnectionException;
|
import com.sun.mail.iap.ConnectionException;
|
||||||
import com.sun.mail.iap.ProtocolException;
|
|
||||||
import com.sun.mail.imap.AppendUID;
|
import com.sun.mail.imap.AppendUID;
|
||||||
import com.sun.mail.imap.IMAPFolder;
|
import com.sun.mail.imap.IMAPFolder;
|
||||||
import com.sun.mail.imap.IMAPMessage;
|
import com.sun.mail.imap.IMAPMessage;
|
||||||
import com.sun.mail.imap.IMAPStore;
|
import com.sun.mail.imap.IMAPStore;
|
||||||
import com.sun.mail.imap.protocol.IMAPProtocol;
|
|
||||||
import com.sun.mail.util.FolderClosedIOException;
|
import com.sun.mail.util.FolderClosedIOException;
|
||||||
import com.sun.mail.util.MailConnectException;
|
import com.sun.mail.util.MailConnectException;
|
||||||
|
|
||||||
|
@ -1026,24 +1024,12 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
if (!istore.isConnected())
|
if (!istore.isConnected())
|
||||||
throw new StoreClosedException(istore);
|
throw new StoreClosedException(istore);
|
||||||
|
|
||||||
for (final EntityFolder folder : folders.keySet()) {
|
for (EntityFolder folder : folders.keySet())
|
||||||
IMAPFolder ifolder = folders.get(folder);
|
|
||||||
if (capIdle) {
|
if (capIdle) {
|
||||||
try {
|
if (!folders.get(folder).isOpen())
|
||||||
ifolder.doCommand(new IMAPFolder.ProtocolCommand() {
|
throw new FolderClosedException(folders.get(folder));
|
||||||
public Object doCommand(IMAPProtocol p)
|
|
||||||
throws ProtocolException {
|
|
||||||
Log.i(Helper.TAG, folder.name + " do noop");
|
|
||||||
p.simpleCommand("NOOP", null);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (MessagingException ex) {
|
|
||||||
throw new FolderClosedException(ifolder, "NOOP", ex);
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
synchronizeMessages(account, folder, ifolder, state);
|
synchronizeMessages(account, folder, folders.get(folder), state);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue