Reduce calls to sleep for WebSocket keep alives.

This commit is contained in:
Cody Henthorne
2026-02-19 14:35:01 -05:00
parent 9c29601b55
commit b4d781ddbb
3 changed files with 14 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ class JobRunner extends Thread {
PowerManager.WakeLock wakeLock = null;
try {
wakeLock = WakeLockUtil.acquire(application, PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TIMEOUT, job.getId());
wakeLock = WakeLockUtil.acquire(application, PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TIMEOUT, job.getFactoryKey());
result = job.run();
if (job.isCanceled()) {
@@ -110,7 +110,7 @@ class JobRunner extends Thread {
return Job.Result.failure();
} finally {
if (wakeLock != null) {
WakeLockUtil.release(wakeLock, job.getId());
WakeLockUtil.release(wakeLock, job.getFactoryKey());
}
}