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

Commit b3ea252a authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Localize audio hashmap debug logging am: 31c879b0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1736640

Change-Id: Ic12775d4a8a898b50585256c13f2e45f959cb613
parents 1065553b 31c879b0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -172,6 +172,12 @@ static void a2dp_open_ctrl_path(struct a2dp_stream_common* common);
/*****************************************************************************
 *   Miscellaneous helper functions
 *****************************************************************************/
static void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}

/* logs timestamp with microsec precision
   pprev is optional in case a dedicated diff is required */
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ struct ha_stream_in {
/*****************************************************************************
 *  Static functions
 *****************************************************************************/
static void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    LOG_INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}

static size_t out_get_buffer_size(const struct audio_stream* stream);

+0 −6
Original line number Diff line number Diff line
@@ -32,9 +32,3 @@
// A new hash map or NULL is returned and is owned by the caller.
std::unordered_map<std::string, std::string>
hash_map_utils_new_from_string_params(const char* params);

// Dumps the contents of the hash_map to the log for debugging purposes.
// If |map| is not NULL, all entries of |map| will be dumped, otherwise nothing
// will be dumped. Note that this function does not take the ownership of |map|.
void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map);
+0 −7
Original line number Diff line number Diff line
@@ -74,10 +74,3 @@ hash_map_utils_new_from_string_params(const char* params) {
  osi_free(str);
  return map;
}

void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    LOG_INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}