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

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

Add stack/include/btm_api_types::power_mode_text am: 89c4799f am: 4eaad091

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I56c5c7cac1556895c0ab3e22e5a594d6b1aad00c
parents 5aaec771 4eaad091
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1004,6 +1004,22 @@ enum : uint8_t {
};
typedef uint8_t tBTM_PM_MODE;

inline std::string power_mode_text(tBTM_PM_MODE mode) {
  std::string s = base::StringPrintf((mode & BTM_PM_MD_FORCE) ? "" : "forced:");
  switch (mode & ~BTM_PM_MD_FORCE) {
    case BTM_PM_MD_ACTIVE:
      return s + std::string("active");
    case BTM_PM_MD_HOLD:
      return s + std::string("hold");
    case BTM_PM_MD_SNIFF:
      return s + std::string("sniff");
    case BTM_PM_MD_PARK:
      return s + std::string("park");
    default:
      return s + std::string("UNKNOWN");
  }
}

#define BTM_PM_SET_ONLY_ID 0x80

/* Operation codes */