Fixed setting JavaMail properties

This commit is contained in:
M66B
2018-08-28 18:47:22 +00:00
parent 00130880ea
commit 15d7b0606f
2 changed files with 14 additions and 20 deletions

View File

@@ -127,15 +127,6 @@ public class ServiceSynchronize extends LifecycleService {
static final String ACTION_SYNCHRONIZE_FOLDER = BuildConfig.APPLICATION_ID + ".SYNCHRONIZE_FOLDER";
static final String ACTION_PROCESS_OPERATIONS = BuildConfig.APPLICATION_ID + ".PROCESS_OPERATIONS";
public ServiceSynchronize() {
// https://docs.oracle.com/javaee/6/api/javax/mail/internet/package-summary.html
// https://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMultipart.html
System.setProperty("mail.mime.ignoreunknownencoding", "true");
System.setProperty("mail.mime.decodefilename", "true");
System.setProperty("mail.mime.encodefilename", "true");
System.setProperty("mail.mime.multipart.ignoreexistingboundaryparameter", "true");
}
@Override
public void onCreate() {
Log.i(Helper.TAG, "Service create version=" + BuildConfig.VERSION_NAME);
@@ -419,7 +410,6 @@ public class ServiceSynchronize extends LifecycleService {
Log.i(Helper.TAG, account.name + " event: " + e.getMessage());
db.account().setAccountError(account.id, e.getMessage());
synchronized (state) {
state.notifyAll();
}