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

Commit 8afdadb9 authored by Sarvesh Kalwit's avatar Sarvesh Kalwit
Browse files

system/btif: Update misc BT_STATUS_FAIL with more descriptive metrics

Bug: 340296381
Test: m -j
Flag: Exempt, metrics-only change
Change-Id: I425b059de0311583a3688123f0b1e09b49dec044
parent 5b5d86fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ bt_status_t BTA_HfClientOpen(const RawAddress& bd_addr, uint16_t* p_handle) {

  if (!bta_hf_client_allocate_handle(bd_addr, p_handle)) {
    log::error("could not allocate handle");
    return BT_STATUS_FAIL;
    return BT_STATUS_NOMEM;
  }

  p_buf->hdr.event = BTA_HF_CLIENT_API_OPEN_EVT;
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static bt_status_t wakelock_acquire_native(void) {
  locked_id_len = write(wake_lock_fd, WAKE_LOCK_ID, lock_name_len);
  if (locked_id_len == -1) {
    log::error("wake lock not acquired: {}", strerror(errno));
    return BT_STATUS_FAIL;
    return BT_STATUS_WAKELOCK_ERROR;
  } else if (locked_id_len < lock_name_len) {
    // TODO (jamuraa): this is weird. maybe we should release and retry.
    log::warn("wake lock truncated to {} chars", locked_id_len);
+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ bt_status_t do_in_main_thread(const base::Location& from_here,
                              base::OnceClosure task) {
  if (!main_thread.DoInThread(from_here, std::move(task))) {
    log::error("failed from {}", from_here.ToString());
    return BT_STATUS_FAIL;
    return BT_STATUS_JNI_THREAD_ATTACH_ERROR;
  }
  return BT_STATUS_SUCCESS;
}
@@ -53,7 +53,7 @@ bt_status_t do_in_main_thread_delayed(const base::Location& from_here,
                                      std::chrono::microseconds delay) {
  if (!main_thread.DoInThreadDelayed(from_here, std::move(task), delay)) {
    log::error("failed from {}", from_here.ToString());
    return BT_STATUS_FAIL;
    return BT_STATUS_JNI_THREAD_ATTACH_ERROR;
  }
  return BT_STATUS_SUCCESS;
}