remove probably unneeded afterForegroundWakeLock() - jobs/fetch have their own wakelocks

This commit is contained in:
B. Petersen
2019-11-09 00:50:20 +01:00
parent d3af3f437b
commit 83d7cdaa1e
2 changed files with 0 additions and 8 deletions
@@ -71,9 +71,6 @@ public class ApplicationDcContext extends DcContext {
smtpWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "smtpWakeLock");
smtpWakeLock.setReferenceCounted(false); // if the idle-thread is killed for any reasons, it is better not to rely on reference counting
afterForegroundWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "afterForegroundWakeLock");
afterForegroundWakeLock.setReferenceCounted(false);
} catch (Exception e) {
Log.e(TAG, "Cannot create wakeLocks");
}
@@ -308,8 +305,6 @@ public class ApplicationDcContext extends DcContext {
private PowerManager.WakeLock smtpWakeLock = null;
private int smtpLoops = 0;
public PowerManager.WakeLock afterForegroundWakeLock = null;
public final static int INTERRUPT_IDLE = 0x01; // interrupt idle if the thread is already running
public void startThreads(int flags) {
@@ -50,9 +50,6 @@ public class ForegroundDetector implements Application.ActivityLifecycleCallback
}
refs--;
if (refs == 0) {
application.dcContext.afterForegroundWakeLock.acquire(60*1000);
}
}
@Override