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

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

Add stack/include/btm_api_types::power_mode_status_text am: c36d4607 am: c72e6ae6

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib36943f3725ee81fc9415f3ded044eb7096b34ec
parents 6b86a32f c72e6ae6
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -973,6 +973,27 @@ enum : uint8_t {
};
typedef uint8_t tBTM_PM_STATUS;

inline std::string power_mode_status_text(tBTM_PM_STATUS status) {
  switch (status) {
    case BTM_PM_STS_ACTIVE:
      return std::string("active");
    case BTM_PM_STS_HOLD:
      return std::string("hold");
    case BTM_PM_STS_SNIFF:
      return std::string("sniff");
    case BTM_PM_STS_PARK:
      return std::string("park");
    case BTM_PM_STS_SSR:
      return std::string("sniff_subrating");
    case BTM_PM_STS_PENDING:
      return std::string("pending");
    case BTM_PM_STS_ERROR:
      return std::string("error");
    default:
      return std::string("UNKNOWN");
  }
}

/* BTM Power manager modes */
enum : uint8_t {
  BTM_PM_MD_ACTIVE = HCI_MODE_ACTIVE,  // 0x00