This commit is contained in:
B. Petersen
2019-02-01 00:13:36 +01:00
parent 15f37c8531
commit b33b7c0c8a
2 changed files with 4 additions and 4 deletions
@@ -82,8 +82,8 @@ 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
afterForgroundWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "afterForegroundWakeLock");
afterForgroundWakeLock.setReferenceCounted(false);
afterForegroundWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "afterForegroundWakeLock");
afterForegroundWakeLock.setReferenceCounted(false);
} catch (Exception e) {
Log.e(TAG, "Cannot create wakeLocks");
@@ -311,7 +311,7 @@ public class ApplicationDcContext extends DcContext {
public Thread smtpThread = null;
private PowerManager.WakeLock smtpWakeLock = null;
public PowerManager.WakeLock afterForgroundWakeLock = null;
public PowerManager.WakeLock afterForegroundWakeLock = null;
public final static int INTERRUPT_IDLE = 0x01; // interrupt idle if the thread is already running
@@ -52,7 +52,7 @@ public class ForegroundDetector implements Application.ActivityLifecycleCallback
refs--;
if (refs == 0) {
application.dcContext.afterForgroundWakeLock.acquire(60*1000);
application.dcContext.afterForegroundWakeLock.acquire(60*1000);
}
}