mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
2507276a1e
commit
5734c5f2e5
|
@ -2330,14 +2330,14 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
|
|
||||||
state = new ServiceState();
|
state = new ServiceState();
|
||||||
state.thread = new Thread(new Runnable() {
|
state.thread = new Thread(new Runnable() {
|
||||||
|
PowerManager pm = getSystemService(PowerManager.class);
|
||||||
|
PowerManager.WakeLock wl = pm.newWakeLock(
|
||||||
|
PowerManager.PARTIAL_WAKE_LOCK,
|
||||||
|
BuildConfig.APPLICATION_ID + ":start");
|
||||||
private List<ServiceState> threadState = new ArrayList<>();
|
private List<ServiceState> threadState = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PowerManager pm = getSystemService(PowerManager.class);
|
|
||||||
PowerManager.WakeLock wl = pm.newWakeLock(
|
|
||||||
PowerManager.PARTIAL_WAKE_LOCK,
|
|
||||||
BuildConfig.APPLICATION_ID + ":start");
|
|
||||||
try {
|
try {
|
||||||
wl.acquire();
|
wl.acquire();
|
||||||
|
|
||||||
|
@ -2457,13 +2457,13 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
|
|
||||||
queued++;
|
queued++;
|
||||||
lifecycle.submit(new Runnable() {
|
lifecycle.submit(new Runnable() {
|
||||||
|
PowerManager pm = getSystemService(PowerManager.class);
|
||||||
|
PowerManager.WakeLock wl = pm.newWakeLock(
|
||||||
|
PowerManager.PARTIAL_WAKE_LOCK,
|
||||||
|
BuildConfig.APPLICATION_ID + ":reload");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PowerManager pm = getSystemService(PowerManager.class);
|
|
||||||
PowerManager.WakeLock wl = pm.newWakeLock(
|
|
||||||
PowerManager.PARTIAL_WAKE_LOCK,
|
|
||||||
BuildConfig.APPLICATION_ID + ":reload");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
wl.acquire();
|
wl.acquire();
|
||||||
|
|
||||||
|
@ -2502,13 +2502,13 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
Log.v(Helper.TAG, outbox.name + " run operations");
|
Log.v(Helper.TAG, outbox.name + " run operations");
|
||||||
|
|
||||||
executor.submit(new Runnable() {
|
executor.submit(new Runnable() {
|
||||||
|
PowerManager pm = getSystemService(PowerManager.class);
|
||||||
|
PowerManager.WakeLock wl = pm.newWakeLock(
|
||||||
|
PowerManager.PARTIAL_WAKE_LOCK,
|
||||||
|
BuildConfig.APPLICATION_ID + ":outbox");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PowerManager pm = getSystemService(PowerManager.class);
|
|
||||||
PowerManager.WakeLock wl = pm.newWakeLock(
|
|
||||||
PowerManager.PARTIAL_WAKE_LOCK,
|
|
||||||
BuildConfig.APPLICATION_ID + ":outbox");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
wl.acquire();
|
wl.acquire();
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
|
|
Loading…
Reference in New Issue