|
|
@ -70,7 +70,6 @@ import java.util.Map;
|
|
|
|
import java.util.Properties;
|
|
|
|
import java.util.Properties;
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
import java.util.concurrent.RejectedExecutionException;
|
|
|
|
|
|
|
|
import java.util.concurrent.Semaphore;
|
|
|
|
import java.util.concurrent.Semaphore;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.mail.Address;
|
|
|
|
import javax.mail.Address;
|
|
|
@ -617,7 +616,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
final long fid = intent.getLongExtra("folder", -1);
|
|
|
|
final long fid = intent.getLongExtra("folder", -1);
|
|
|
|
//Log.v(Helper.TAG, "run operations folder=" + fid);
|
|
|
|
//Log.v(Helper.TAG, "run operations folder=" + fid);
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
executor.submit(new Runnable() {
|
|
|
|
executor.submit(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
@ -666,9 +664,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} catch (RejectedExecutionException ex) {
|
|
|
|
|
|
|
|
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -1463,7 +1458,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
for (Thread t : threads)
|
|
|
|
for (Thread t : threads)
|
|
|
|
join(t);
|
|
|
|
join(t);
|
|
|
|
threads.clear();
|
|
|
|
threads.clear();
|
|
|
|
executor.shutdown();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Stop monitoring outbox
|
|
|
|
// Stop monitoring outbox
|
|
|
|
lbm.unregisterReceiver(outboxReceiver);
|
|
|
|
lbm.unregisterReceiver(outboxReceiver);
|
|
|
@ -1504,7 +1498,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
Properties props = MessageHelper.getSessionProperties();
|
|
|
|
Properties props = MessageHelper.getSessionProperties();
|
|
|
|
final Session isession = Session.getInstance(props, null);
|
|
|
|
final Session isession = Session.getInstance(props, null);
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
executor.submit(new Runnable() {
|
|
|
|
executor.submit(new Runnable() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
@ -1519,9 +1512,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} catch (RejectedExecutionException ex) {
|
|
|
|
|
|
|
|
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|