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

Commit 955dc220 authored by Rahul Arya's avatar Rahul Arya
Browse files

[Invisalign] Do not run profile dumpsys from core

Trigger the same dumpsys operations from outside.

Test: adb shell dumpsys bluetooth_manager
Bug: 254063018
Change-Id: Iccce2f80e215f5f5587678193e1d02754344e7b8
parent 4ed908e6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -143,4 +143,6 @@ extern void btif_hh_getreport(btif_hh_device_t* p_dev,
                              uint16_t bufferSize);
extern void btif_hh_service_registration(bool enable);

extern void DumpsysHid(int fd);

#endif
+2 −0
Original line number Diff line number Diff line
@@ -756,6 +756,8 @@ static void dump(int fd, const char** arguments) {
#endif
  connection_manager::dump(fd);
  bluetooth::bqr::DebugDump(fd);
  PAN_Dumpsys(fd);
  DumpsysHid(fd);
  bluetooth::shim::Dump(fd, arguments);
}

+26 −0
Original line number Diff line number Diff line
@@ -1835,3 +1835,29 @@ const bthh_interface_t* btif_hh_get_interface() {
  BTIF_TRACE_EVENT("%s", __func__);
  return &bthhInterface;
}

#define DUMPSYS_TAG "shim::legacy::hid"
void DumpsysHid(int fd) {
  LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG);
  LOG_DUMPSYS(fd, "status:%s num_devices:%u",
              btif_hh_status_text(btif_hh_cb.status).c_str(),
              btif_hh_cb.device_num);
  LOG_DUMPSYS(fd, "status:%s", btif_hh_status_text(btif_hh_cb.status).c_str());
  for (unsigned i = 0; i < BTIF_HH_MAX_HID; i++) {
    const btif_hh_device_t* p_dev = &btif_hh_cb.devices[i];
    if (p_dev->bd_addr != RawAddress::kEmpty) {
      LOG_DUMPSYS(fd, "  %u: addr:%s fd:%d state:%s ready:%s thread_id:%d", i,
                  PRIVATE_ADDRESS(p_dev->bd_addr), p_dev->fd,
                  bthh_connection_state_text(p_dev->dev_status).c_str(),
                  (p_dev->ready_for_data) ? ("T") : ("F"),
                  static_cast<int>(p_dev->hh_poll_thread_id));
    }
  }
  for (unsigned i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
    const btif_hh_added_device_t* p_dev = &btif_hh_cb.added_devices[i];
    if (p_dev->bd_addr != RawAddress::kEmpty) {
      LOG_DUMPSYS(fd, "  %u: addr:%s", i, PRIVATE_ADDRESS(p_dev->bd_addr));
    }
  }
}
#undef DUMPSYS_TAG
 No newline at end of file
+0 −30
Original line number Diff line number Diff line
@@ -1194,34 +1194,6 @@ void DumpsysAcl(int fd) {
using Record = common::TimestampedEntry<std::string>;
const std::string kTimeFormat("%Y-%m-%d %H:%M:%S");

#define DUMPSYS_TAG "shim::legacy::hid"
extern btif_hh_cb_t btif_hh_cb;

void DumpsysHid(int fd) {
  LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG);
  LOG_DUMPSYS(fd, "status:%s num_devices:%u",
              btif_hh_status_text(btif_hh_cb.status).c_str(),
              btif_hh_cb.device_num);
  LOG_DUMPSYS(fd, "status:%s", btif_hh_status_text(btif_hh_cb.status).c_str());
  for (unsigned i = 0; i < BTIF_HH_MAX_HID; i++) {
    const btif_hh_device_t* p_dev = &btif_hh_cb.devices[i];
    if (p_dev->bd_addr != RawAddress::kEmpty) {
      LOG_DUMPSYS(fd, "  %u: addr:%s fd:%d state:%s ready:%s thread_id:%d", i,
                  PRIVATE_ADDRESS(p_dev->bd_addr), p_dev->fd,
                  bthh_connection_state_text(p_dev->dev_status).c_str(),
                  (p_dev->ready_for_data) ? ("T") : ("F"),
                  static_cast<int>(p_dev->hh_poll_thread_id));
    }
  }
  for (unsigned i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
    const btif_hh_added_device_t* p_dev = &btif_hh_cb.added_devices[i];
    if (p_dev->bd_addr != RawAddress::kEmpty) {
      LOG_DUMPSYS(fd, "  %u: addr:%s", i, PRIVATE_ADDRESS(p_dev->bd_addr));
    }
  }
}
#undef DUMPSYS_TAG

#define DUMPSYS_TAG "shim::legacy::btm"
void DumpsysBtm(int fd) {
  LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG);
@@ -1261,8 +1233,6 @@ void DumpsysRecord(int fd) {
#undef DUMPSYS_TAG

void shim::legacy::Acl::Dump(int fd) const {
  PAN_Dumpsys(fd);
  DumpsysHid(fd);
  DumpsysRecord(fd);
  DumpsysAcl(fd);
  DumpsysL2cap(fd);
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>

#include "btif/include/btif_hh.h"
#include "btm_api.h"
#include "hiddefs.h"
#include "hidh_int.h"