OSDN Git Service

Log encryption key size
authorJack He <siyuanh@google.com>
Wed, 20 Mar 2019 20:31:58 +0000 (13:31 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 26 Mar 2019 20:06:01 +0000 (20:06 +0000)
* Log result from HCI_READ_ENCR_KEY_SIZE command

Bug: 124301137
Test: test drive with statsd
Change-Id: I6274f244a6f03d2a0054e985d7daf8104c8cdfe7

stack/btu/btu_hcif.cc

index 6191d68..987d173 100644 (file)
@@ -792,6 +792,16 @@ static void btu_hcif_log_command_complete_metrics(uint16_t opcode,
       bluetooth::common::LogClassicPairingEvent(RawAddress::kEmpty, bluetooth::common::kUnknownConnectionHandle, opcode,
                                                 hci_event, status, reason, 0);
       break;
+    case HCI_READ_ENCR_KEY_SIZE: {
+      uint16_t handle;
+      uint8_t key_size;
+      STREAM_TO_UINT8(status, p_return_params);
+      STREAM_TO_UINT16(handle, p_return_params);
+      STREAM_TO_UINT8(key_size, p_return_params);
+      bluetooth::common::LogClassicPairingEvent(RawAddress::kEmpty, handle, opcode, hci_event, status, reason,
+                                                key_size);
+      break;
+    }
     case HCI_LINK_KEY_REQUEST_REPLY:
     case HCI_LINK_KEY_REQUEST_NEG_REPLY:
     case HCI_IO_CAPABILITY_REQUEST_REPLY: