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

Commit c72e6ae6 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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32deff955b2f052ff29b5b417e6c96c059608831
parents 9470bcd0 c36d4607
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