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

Commit 565d3738 authored by Hui Peng's avatar Hui Peng
Browse files

[Invisalign2] Add values for security in tBTM_STATUS

Bug: 301661850
Test: mma packages/modules/Bluetooth
Change-Id: I08e899910669e55b2971dce90b853b0cabf62016
parent 371e61c2
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -45,6 +45,10 @@ enum : uint8_t {
                                        supported */
                                        supported */
  BTM_DEV_RESTRICT_LISTED,           /* 21 The device is restrict listed */
  BTM_DEV_RESTRICT_LISTED,           /* 21 The device is restrict listed */
  BTM_ERR_KEY_MISSING,               /* 22 Handle for Pin or Key Missing */
  BTM_ERR_KEY_MISSING,               /* 22 Handle for Pin or Key Missing */
  BTM_NOT_AUTHENTICATED,             /* 23 the link is not authenticated */
  BTM_NOT_ENCRYPTED,                 /* 24 the link is not encrypted */
  BTM_INSUFFICIENT_ENCRYPT_KEY_SIZE, /* 25 the encrypt key size not sufficient
                                      */
  BTM_MAX_STATUS_VALUE,
  BTM_MAX_STATUS_VALUE,
  BTM_UNDEFINED = 0xFF,
  BTM_UNDEFINED = 0xFF,
};
};
@@ -88,6 +92,9 @@ inline std::string btm_status_text(const tBTM_STATUS& status) {
    CASE_RETURN_TEXT(BTM_MODE4_LEVEL4_NOT_SUPPORTED);
    CASE_RETURN_TEXT(BTM_MODE4_LEVEL4_NOT_SUPPORTED);
    CASE_RETURN_TEXT(BTM_DEV_RESTRICT_LISTED);
    CASE_RETURN_TEXT(BTM_DEV_RESTRICT_LISTED);
    CASE_RETURN_TEXT(BTM_ERR_KEY_MISSING);
    CASE_RETURN_TEXT(BTM_ERR_KEY_MISSING);
    CASE_RETURN_TEXT(BTM_NOT_AUTHENTICATED);
    CASE_RETURN_TEXT(BTM_NOT_ENCRYPTED);
    CASE_RETURN_TEXT(BTM_INSUFFICIENT_ENCRYPT_KEY_SIZE);
    default:
    default:
      return base::StringPrintf("UNKNOWN[%hhu]", status);
      return base::StringPrintf("UNKNOWN[%hhu]", status);
  }
  }