WHOOP's Android team reduced excessive partial wake lock sessions from 15% to under 1% by diagnosing and fixing a CoroutineWorker that held wake locks indefinitely when no sensor was connected. Using Android vitals' excessive partial wake locks dashboard, internal WorkManager metrics, and Android Studio's Background Task Inspector, they traced the root cause to a SensorWorker that failed to exit early when the WHOOP sensor was unavailable. The fix was a simple null-check on the sensor connection state before executing business logic, allowing the worker to return failure immediately instead of waiting until timeout. The improvement was visible within 30 days and also reduced worker timeouts and average runtimes.

6m read timeFrom android-developers.googleblog.com
Post cover image

Sort: