As an alternative, if you're just using a one-off WakeLock and you don't need to share it across multiple tasks, you can also call wakeLock.setReferenceCounted(false) prior to calling wakeLock.acquire(). This would avoid the thread-safety concerns and still prevent the crash.