Skip to content
Snippets Groups Projects
Commit b1a7d47e authored by Martin Brabham's avatar Martin Brabham Committed by Myles Watson
Browse files

osi: explicitly release wakelock during turn off

Ensures we release the wakelock when turning off if any module hasn't stopped timers properly

Bug: 123289721
Test: atest net_test_bluetooth
Change-Id: Ibec5c262d2ec33ce22f2c8bb2a9b838e8d6b90a7
parent baaeb80c
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,10 @@ static void wakelock_initialize_native(void) {
}
void wakelock_cleanup(void) {
if (wakelock_stats.is_acquired) {
LOG_ERROR(LOG_TAG, "%s releasing wake lock as part of cleanup", __func__);
wakelock_release();
}
wake_lock_path.clear();
wake_unlock_path.clear();
initialized = PTHREAD_ONCE_INIT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment