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

Commit 8e7344e4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "legacy: Use proper stringprintf method for to_text defaults"

parents 60db7ff3 ca01f585
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#ifndef BTA_API_H
#define BTA_API_H

#include <base/strings/stringprintf.h>

#include <cstdint>
#include <vector>

@@ -151,7 +153,7 @@ inline std::string preferred_role_text(const tBTA_PREF_ROLES& role) {
    CASE_RETURN_TEXT(BTA_CENTRAL_ROLE_ONLY);
    CASE_RETURN_TEXT(BTA_PERIPHERAL_ROLE_ONLY);
    default:
      return std::string("UNKNOWN:%hhu", role);
      return base::StringPrintf("UNKNOWN[%hhu]", role);
  }
}
#undef CASE_RETURN_TEXT
+2 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#define BTA_GATT_API_H

#include <base/callback_forward.h>
#include <base/strings/stringprintf.h>

#include <list>
#include <string>
@@ -95,7 +96,7 @@ inline std::string gatt_client_event_text(const tBTA_GATTC_EVT& event) {
    CASE_RETURN_TEXT(BTA_GATTC_PHY_UPDATE_EVT);
    CASE_RETURN_TEXT(BTA_GATTC_CONN_UPDATE_EVT);
    default:
      return std::string("UNKNOWN[%hhu]", event);
      return base::StringPrintf("UNKNOWN[%hhu]", event);
  }
}
#undef CASE_RETURN_TEXT
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ inline std::string bta_hh_status_text(const tBTA_HH_STATUS& status) {
    CASE_RETURN_TEXT(BTA_HH_ERR_HDL);
    CASE_RETURN_TEXT(BTA_HH_ERR_SEC);
    default:
      return std::string("UNKNOWN[%hhu]", status);
      return base::StringPrintf("UNKNOWN[%hhu]", status);
  }
}

+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#ifndef BTIF_HH_H
#define BTIF_HH_H

#include <base/strings/stringprintf.h>
#include <hardware/bluetooth.h>
#include <hardware/bt_hh.h>
#include <pthread.h>
@@ -72,7 +73,7 @@ inline std::string btif_hh_status_text(const BTIF_HH_STATUS& status) {
    CASE_RETURN_TEXT(BTIF_HH_DEV_CONNECTED);
    CASE_RETURN_TEXT(BTIF_HH_DEV_DISCONNECTED);
    default:
      return std::string("UNKNOWN[%hhu]", status);
      return base::StringPrintf("UNKNOWN[%u]", status);
  }
}
#undef CASE_RETURN_TEXT
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#ifndef ANDROID_INCLUDE_BT_HH_H
#define ANDROID_INCLUDE_BT_HH_H

#include <base/strings/stringprintf.h>
#include <raw_address.h>
#include <stdint.h>

@@ -49,7 +50,7 @@ inline std::string bthh_connection_state_text(
    CASE_RETURN_TEXT(BTHH_CONN_STATE_DISCONNECTING);
    CASE_RETURN_TEXT(BTHH_CONN_STATE_UNKNOWN);
    default:
      return std::string("UNKNOWN[%u]", state);
      return base::StringPrintf("UNKNOWN[%d]", state);
  }
}
#undef CASE_RETURN_TEXT
Loading