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

Commit 29d07e29 authored by Arman Uguray's avatar Arman Uguray
Browse files

service: Don't lie about supporting wake locks

Changed the code to return error rather than success from the native
bt_os_callout_t hooks.

Bug: 23390297
Change-Id: I0a4e2678ace88072294b82e57cf1e1bd3edd08cd
parent 2c6a7d03
Loading
Loading
Loading
Loading
+12 −15
Original line number Diff line number Diff line
@@ -90,27 +90,24 @@ bool SetWakeAlarmCallout(uint64_t /* delay_millis */,
                         bool /* should_wake */,
                         alarm_cb /* cb */,
                         void* /* data */) {
  // TODO(armansito): Figure out what to do with this callback. It's not being
  // used by us right now but the code crashes without setting it. The stack
  // should be refactored to make things optional and definitely not crash.
  // (See http://b/23315739)
  return true;
  // TODO(armansito): According to sharvil@, this interface doesn't even need to
  // exist and can be done entirely from within osi by interfacing directly with
  // the kernel. Remove these stubs once that's fixed. (See http://b/23390297)
  return false;
}

int AcquireWakeLockCallout(const char* /* lock_name */) {
  // TODO(armansito): Figure out what to do with this callback. It's not being
  // used by us right now but the code crashes without setting it. The stack
  // should be refactored to make things optional and definitely not crash.
  // (See http://b/23315739)
  return BT_STATUS_SUCCESS;
  // TODO(armansito): According to sharvil@, this interface doesn't even need to
  // exist and can be done entirely from within osi by interfacing directly with
  // the kernel. Remove these stubs once that's fixed. (See http://b/23390297)
  return BT_STATUS_UNSUPPORTED;
}

int ReleaseWakeLockCallout(const char* /* lock_name */) {
  // TODO(armansito): Figure out what to do with this callback. It's not being
  // used by us right now but the code crashes without setting it. The stack
  // should be refactored to make things optional and definitely not crash.
  // (See http://b/23315739)
  return BT_STATUS_SUCCESS;
  // TODO(armansito): According to sharvil@, this interface doesn't even need to
  // exist and can be done entirely from within osi by interfacing directly with
  // the kernel. Remove these stubs once that's fixed. (See http://b/23390297)
  return BT_STATUS_UNSUPPORTED;
}

// The HAL Bluetooth DM callbacks.