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

Commit 4eaad091 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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I71d29aebef69c01271a29eba112f95d3ece46ae8
parents 75d21709 89c4799f
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 */