Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;