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

Commit 85ec1138 authored by Jack He's avatar Jack He
Browse files

Call wakelock callouts in JNI thread

Bug: 180790614
Fixes: 180790614
Test: start up Bluetooth
Tag: #refactor
Change-Id: If1eee9532f20e264ff33a0e2adbf1b06dc3900e6
parent 63fff77b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -526,14 +526,14 @@ int le_test_mode(uint16_t opcode, uint8_t* buf, uint8_t len) {
static bt_os_callouts_t* wakelock_os_callouts_saved = nullptr;

static int acquire_wake_lock_cb(const char* lock_name) {
  return do_in_main_thread(
  return do_in_jni_thread(
      FROM_HERE, base::Bind(base::IgnoreResult(
                                wakelock_os_callouts_saved->acquire_wake_lock),
                            lock_name));
}

static int release_wake_lock_cb(const char* lock_name) {
  return do_in_main_thread(
  return do_in_jni_thread(
      FROM_HERE, base::Bind(base::IgnoreResult(
                                wakelock_os_callouts_saved->release_wake_lock),
                            lock_name));