mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
remove probably unneeded afterForegroundWakeLock() - jobs/fetch have their own wakelocks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user