mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Add comments for wake lock handling.
This commit is contained in:
@@ -75,10 +75,14 @@ class AndroidWakeLockManagerImpl implements AndroidWakeLockManager {
|
|||||||
try {
|
try {
|
||||||
r.run();
|
r.run();
|
||||||
} finally {
|
} finally {
|
||||||
|
// Release the wake lock if the task throws an exception
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// Release the wake lock if the executor throws an exception when
|
||||||
|
// we submit the task (in which case the release() call above won't
|
||||||
|
// happen)
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user