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

Commit 8480bd44 authored by Chris Manton's avatar Chris Manton
Browse files

stack::btm::rnr: BTM_CancelRemoteDeviceName Fail early

Bug: 345308047
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I55c893706a0654799c8a6b403a7c8cdfffe426e2
parent 0dcdecf2
Loading
Loading
Loading
Loading
+21 −20
Original line number Diff line number Diff line
@@ -860,7 +860,10 @@ tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
  bool is_le;

  /* Make sure there is not already one in progress */
  if (btm_cb.btm_inq_vars.remname_active) {
  if (!btm_cb.btm_inq_vars.remname_active) {
    return (BTM_WRONG_MODE);
  }

  if (com::android::bluetooth::flags::rnr_store_device_type()) {
    is_le = (btm_cb.btm_inq_vars.remname_dev_type == BT_DEVICE_TYPE_BLE);
  } else {
@@ -880,8 +883,6 @@ tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
    }
  }
  return (BTM_CMD_STARTED);
  } else
    return (BTM_WRONG_MODE);
}

/*******************************************************************************