vendor_lib: Apply clang-format with the new config

cd vendor_libs/test_vendor_lib/
clang-format ../linux/bt_vendor_linux.c -style=file -i
clang-format include/* test/* src/* -style=file -i

Update the style guide since clang-format help uses the
-style=file option.

Test: mm -j32
Change-Id: I166adfb2bb9a87fefa1242c91e5f180011caa2ad
diff --git a/system/doc/style_guide.md b/system/doc/style_guide.md
index 9957bf5..f151ce0 100644
--- a/system/doc/style_guide.md
+++ b/system/doc/style_guide.md
@@ -265,11 +265,11 @@
 Code formatting is done automatically using clang-format.
 
 The style file is located at the root of the source tree in .clang-format.  The
---style=file option instructs clang-format to look for this file.  You may find
+-style=file option instructs clang-format to look for this file.  You may find
 clang-format --help useful for more advanced usage. The [Online clang-format
 Documentation](http://clang.llvm.org/docs/ClangFormat.html) can also be helpful.
 
-`clang-format --style=file -i path_to_files/filename_or_*`
+`clang-format -style=file -i path_to_files/filename_or_*`
 
 ### My Patch Doesn't Apply Anymore!
 Choose one of the options below.  The fewer patches that have been applied to
@@ -316,7 +316,7 @@
 
 ##### Reformat the code
 
-`clang-format --style=file -i path_to_files/filename_or_*`
+`clang-format -style=file -i path_to_files/filename_or_*`
 
 ##### Commit the code that your patch touched
 
@@ -352,7 +352,7 @@
 
 ##### Reformat the code
 
-`clang-format --style=file -i path_to_files/filename_or_*`
+`clang-format -style=file -i path_to_files/filename_or_*`
 
 ##### Commit your temporary formatting patch
 
@@ -372,7 +372,7 @@
 
 ##### Reformat the code
 
-`clang-format --style=file -i path_to_files/filename_or_*`
+`clang-format -style=file -i path_to_files/filename_or_*`
 
 ##### Commit your second temporary formatting patch
 
@@ -406,7 +406,7 @@
 
 ##### Remember to edit the commit message!
 
-`clang-format --style=file -i path_to_files/filename_or_*`
+`clang-format -style=file -i path_to_files/filename_or_*`
 
 ##### Check to see that everything looks right
 
diff --git a/system/vendor_libs/linux/bt_vendor_linux.c b/system/vendor_libs/linux/bt_vendor_linux.c
index 875c75f..5270eab 100644
--- a/system/vendor_libs/linux/bt_vendor_linux.c
+++ b/system/vendor_libs/linux/bt_vendor_linux.c
@@ -20,49 +20,49 @@
 #define LOG_TAG "bt_vendor"
 
 #include <errno.h>
-#include <stdbool.h>
-#include <stdlib.h>
 #include <fcntl.h>
-#include <stdint.h>
-#include <string.h>
 #include <poll.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
 
-#include <sys/socket.h>
 #include <sys/ioctl.h>
+#include <sys/socket.h>
 
 #include "hci/include/bt_vendor_lib.h"
-#include "osi/include/osi.h"
-#include "osi/include/log.h"
-#include "osi/include/properties.h"
 #include "osi/include/compat.h"
+#include "osi/include/log.h"
+#include "osi/include/osi.h"
+#include "osi/include/properties.h"
 
-#define BTPROTO_HCI     1
-#define HCI_CHANNEL_USER        1
-#define HCI_CHANNEL_CONTROL     3
-#define HCI_DEV_NONE    0xffff
+#define BTPROTO_HCI 1
+#define HCI_CHANNEL_USER 1
+#define HCI_CHANNEL_CONTROL 3
+#define HCI_DEV_NONE 0xffff
 
-#define RFKILL_TYPE_BLUETOOTH   2
-#define RFKILL_OP_CHANGE_ALL    3
+#define RFKILL_TYPE_BLUETOOTH 2
+#define RFKILL_OP_CHANGE_ALL 3
 
-#define MGMT_OP_INDEX_LIST      0x0003
-#define MGMT_EV_INDEX_ADDED     0x0004
-#define MGMT_EV_COMMAND_COMP    0x0001
-#define MGMT_EV_SIZE_MAX        1024
-#define MGMT_EV_POLL_TIMEOUT    3000 /* 3000ms */
+#define MGMT_OP_INDEX_LIST 0x0003
+#define MGMT_EV_INDEX_ADDED 0x0004
+#define MGMT_EV_COMMAND_COMP 0x0001
+#define MGMT_EV_SIZE_MAX 1024
+#define MGMT_EV_POLL_TIMEOUT 3000 /* 3000ms */
 
-#define IOCTL_HCIDEVDOWN        _IOW('H', 202, int)
+#define IOCTL_HCIDEVDOWN _IOW('H', 202, int)
 
 struct sockaddr_hci {
-  sa_family_t    hci_family;
+  sa_family_t hci_family;
   unsigned short hci_dev;
   unsigned short hci_channel;
 };
 
 struct rfkill_event {
   uint32_t idx;
-  uint8_t  type;
-  uint8_t  op;
-  uint8_t  soft, hard;
+  uint8_t type;
+  uint8_t op;
+  uint8_t soft, hard;
 } __attribute__((packed));
 
 struct mgmt_pkt {
@@ -79,16 +79,15 @@
   uint16_t index[0];
 } __attribute__((packed));
 
-static const bt_vendor_callbacks_t *bt_vendor_callbacks;
+static const bt_vendor_callbacks_t* bt_vendor_callbacks;
 static unsigned char bt_vendor_local_bdaddr[6];
 static int bt_vendor_fd = -1;
 static int hci_interface;
 static int rfkill_en;
 static int bt_hwcfg_en;
 
-static int bt_vendor_init(const bt_vendor_callbacks_t *p_cb,
-                          unsigned char *local_bdaddr)
-{
+static int bt_vendor_init(const bt_vendor_callbacks_t* p_cb,
+                          unsigned char* local_bdaddr) {
   char prop_value[PROPERTY_VALUE_MAX];
 
   LOG_INFO(LOG_TAG, "%s", __func__);
@@ -100,8 +99,7 @@
 
   bt_vendor_callbacks = p_cb;
 
-  memcpy(bt_vendor_local_bdaddr, local_bdaddr,
-         sizeof(bt_vendor_local_bdaddr));
+  memcpy(bt_vendor_local_bdaddr, local_bdaddr, sizeof(bt_vendor_local_bdaddr));
 
   osi_property_get("bluetooth.interface", prop_value, "0");
 
@@ -110,29 +108,24 @@
     hci_interface = strtol(prop_value, NULL, 10);
   else
     hci_interface = strtol(prop_value + 3, NULL, 10);
-  if (errno)
-    hci_interface = 0;
+  if (errno) hci_interface = 0;
 
   LOG_INFO(LOG_TAG, "Using interface hci%d", hci_interface);
 
   osi_property_get("bluetooth.rfkill", prop_value, "0");
 
   rfkill_en = atoi(prop_value);
-  if (rfkill_en)
-    LOG_INFO(LOG_TAG, "RFKILL enabled");
+  if (rfkill_en) LOG_INFO(LOG_TAG, "RFKILL enabled");
 
-  bt_hwcfg_en = osi_property_get("bluetooth.hwcfg",
-                             prop_value, NULL) > 0 ? 1 : 0;
-  if (bt_hwcfg_en)
-    LOG_INFO(LOG_TAG, "HWCFG enabled");
+  bt_hwcfg_en =
+      osi_property_get("bluetooth.hwcfg", prop_value, NULL) > 0 ? 1 : 0;
+  if (bt_hwcfg_en) LOG_INFO(LOG_TAG, "HWCFG enabled");
 
   return 0;
 }
 
-static int bt_vendor_hw_cfg(int stop)
-{
-  if (!bt_hwcfg_en)
-    return 0;
+static int bt_vendor_hw_cfg(int stop) {
+  if (!bt_hwcfg_en) return 0;
 
   if (stop) {
     if (osi_property_set("bluetooth.hwcfg", "stop") < 0) {
@@ -148,8 +141,7 @@
   return 0;
 }
 
-static int bt_vendor_wait_hcidev(void)
-{
+static int bt_vendor_wait_hcidev(void) {
   struct sockaddr_hci addr;
   struct pollfd fds[1];
   struct mgmt_pkt ev;
@@ -169,7 +161,7 @@
   addr.hci_dev = HCI_DEV_NONE;
   addr.hci_channel = HCI_CHANNEL_CONTROL;
 
-  if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+  if (bind(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
     LOG_ERROR(LOG_TAG, "HCI Channel Control: %s", strerror(errno));
     close(fd);
     return -1;
@@ -216,17 +208,15 @@
       if (ev.opcode == MGMT_EV_INDEX_ADDED && ev.index == hci_interface) {
         goto end;
       } else if (ev.opcode == MGMT_EV_COMMAND_COMP) {
-        struct mgmt_event_read_index *cc;
+        struct mgmt_event_read_index* cc;
         int i;
 
-        cc = (struct mgmt_event_read_index *)ev.data;
+        cc = (struct mgmt_event_read_index*)ev.data;
 
-        if (cc->cc_opcode != MGMT_OP_INDEX_LIST || cc->status != 0)
-          continue;
+        if (cc->cc_opcode != MGMT_OP_INDEX_LIST || cc->status != 0) continue;
 
         for (i = 0; i < cc->num_intf; i++) {
-          if (cc->index[i] == hci_interface)
-            goto end;
+          if (cc->index[i] == hci_interface) goto end;
         }
       }
     }
@@ -237,9 +227,8 @@
   return ret;
 }
 
-static int bt_vendor_open(void *param)
-{
-  int (*fd_array)[] = (int (*)[]) param;
+static int bt_vendor_open(void* param) {
+  int(*fd_array)[] = (int(*)[])param;
   int fd;
 
   LOG_INFO(LOG_TAG, "%s", __func__);
@@ -262,8 +251,7 @@
   return 1;
 }
 
-static int bt_vendor_close(void *param)
-{
+static int bt_vendor_close(void* param) {
   (void)(param);
 
   LOG_INFO(LOG_TAG, "%s", __func__);
@@ -276,8 +264,7 @@
   return 0;
 }
 
-static int bt_vendor_rfkill(int block)
-{
+static int bt_vendor_rfkill(int block) {
   struct rfkill_event event;
   int fd;
 
@@ -308,8 +295,7 @@
 }
 
 /* TODO: fw config should thread the device waiting and return immedialty */
-static void bt_vendor_fw_cfg(void)
-{
+static void bt_vendor_fw_cfg(void) {
   struct sockaddr_hci addr;
   int fd = bt_vendor_fd;
 
@@ -330,7 +316,7 @@
     goto failure;
   }
 
-  if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+  if (bind(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
     LOG_ERROR(LOG_TAG, "socket bind error %s", strerror(errno));
     goto failure;
   }
@@ -346,70 +332,66 @@
   bt_vendor_callbacks->fwcfg_cb(BT_VND_OP_RESULT_FAIL);
 }
 
-static int bt_vendor_op(bt_vendor_opcode_t opcode, void *param)
-{
+static int bt_vendor_op(bt_vendor_opcode_t opcode, void* param) {
   int retval = 0;
 
   LOG_INFO(LOG_TAG, "%s op %d", __func__, opcode);
 
   switch (opcode) {
-  case BT_VND_OP_POWER_CTRL:
-    if (!rfkill_en || !param)
+    case BT_VND_OP_POWER_CTRL:
+      if (!rfkill_en || !param) break;
+
+      if (*((int*)param) == BT_VND_PWR_ON) {
+        retval = bt_vendor_rfkill(0);
+        if (!retval) retval = bt_vendor_hw_cfg(0);
+      } else {
+        retval = bt_vendor_hw_cfg(1);
+        if (!retval) retval = bt_vendor_rfkill(1);
+      }
+
       break;
 
-    if (*((int *)param) == BT_VND_PWR_ON) {
-      retval = bt_vendor_rfkill(0);
-      if (!retval)
-        retval = bt_vendor_hw_cfg(0);
-    } else {
-      retval = bt_vendor_hw_cfg(1);
-      if (!retval)
-        retval = bt_vendor_rfkill(1);
-    }
+    case BT_VND_OP_FW_CFG:
+      bt_vendor_fw_cfg();
+      break;
 
-    break;
+    case BT_VND_OP_SCO_CFG:
+      bt_vendor_callbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS);
+      break;
 
-  case BT_VND_OP_FW_CFG:
-    bt_vendor_fw_cfg();
-    break;
+    case BT_VND_OP_USERIAL_OPEN:
+      retval = bt_vendor_open(param);
+      break;
 
-  case BT_VND_OP_SCO_CFG:
-    bt_vendor_callbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS);
-    break;
+    case BT_VND_OP_USERIAL_CLOSE:
+      retval = bt_vendor_close(param);
+      break;
 
-  case BT_VND_OP_USERIAL_OPEN:
-    retval = bt_vendor_open(param);
-    break;
+    case BT_VND_OP_GET_LPM_IDLE_TIMEOUT:
+      *((uint32_t*)param) = 3000;
+      retval = 0;
+      break;
 
-  case BT_VND_OP_USERIAL_CLOSE:
-    retval = bt_vendor_close(param);
-    break;
+    case BT_VND_OP_LPM_SET_MODE:
+      bt_vendor_callbacks->lpm_cb(BT_VND_OP_RESULT_SUCCESS);
+      break;
 
-  case BT_VND_OP_GET_LPM_IDLE_TIMEOUT:
-    *((uint32_t *)param) = 3000;
-    retval = 0;
-    break;
+    case BT_VND_OP_LPM_WAKE_SET_STATE:
+      break;
 
-  case BT_VND_OP_LPM_SET_MODE:
-    bt_vendor_callbacks->lpm_cb(BT_VND_OP_RESULT_SUCCESS);
-    break;
+    case BT_VND_OP_SET_AUDIO_STATE:
+      bt_vendor_callbacks->audio_state_cb(BT_VND_OP_RESULT_SUCCESS);
+      break;
 
-  case BT_VND_OP_LPM_WAKE_SET_STATE:
-    break;
+    case BT_VND_OP_EPILOG:
+      bt_vendor_callbacks->epilog_cb(BT_VND_OP_RESULT_SUCCESS);
+      break;
 
-  case BT_VND_OP_SET_AUDIO_STATE:
-    bt_vendor_callbacks->audio_state_cb(BT_VND_OP_RESULT_SUCCESS);
-    break;
+    case BT_VND_OP_A2DP_OFFLOAD_START:
+      break;
 
-  case BT_VND_OP_EPILOG:
-    bt_vendor_callbacks->epilog_cb(BT_VND_OP_RESULT_SUCCESS);
-    break;
-
-  case BT_VND_OP_A2DP_OFFLOAD_START:
-    break;
-
-  case BT_VND_OP_A2DP_OFFLOAD_STOP:
-    break;
+    case BT_VND_OP_A2DP_OFFLOAD_STOP:
+      break;
   }
 
   LOG_INFO(LOG_TAG, "%s op %d retval %d", __func__, opcode, retval);
@@ -417,16 +399,13 @@
   return retval;
 }
 
-static void bt_vendor_cleanup(void)
-{
+static void bt_vendor_cleanup(void) {
   LOG_INFO(LOG_TAG, "%s", __func__);
 
   bt_vendor_callbacks = NULL;
 }
 
 EXPORT_SYMBOL const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE = {
-  sizeof(bt_vendor_interface_t),
-  bt_vendor_init,
-  bt_vendor_op,
-  bt_vendor_cleanup,
+    sizeof(bt_vendor_interface_t), bt_vendor_init, bt_vendor_op,
+    bt_vendor_cleanup,
 };
diff --git a/system/vendor_libs/test_vendor_lib/include/dual_mode_controller.h b/system/vendor_libs/test_vendor_lib/include/dual_mode_controller.h
index 95ed403..d52d275 100644
--- a/system/vendor_libs/test_vendor_lib/include/dual_mode_controller.h
+++ b/system/vendor_libs/test_vendor_lib/include/dual_mode_controller.h
@@ -181,8 +181,8 @@
 
   void RegisterPeriodicTaskScheduler(
       std::function<AsyncTaskId(std::chrono::milliseconds,
-                                std::chrono::milliseconds,
-                                const TaskCallback&)> periodicEvtScheduler);
+                                std::chrono::milliseconds, const TaskCallback&)>
+          periodicEvtScheduler);
 
   void RegisterTaskCancel(std::function<void(AsyncTaskId)> cancel);
 
@@ -491,8 +491,7 @@
   std::function<AsyncTaskId(std::chrono::milliseconds, const TaskCallback&)>
       schedule_task_;
   std::function<AsyncTaskId(std::chrono::milliseconds,
-                            std::chrono::milliseconds,
-                            const TaskCallback&)>
+                            std::chrono::milliseconds, const TaskCallback&)>
       schedule_periodic_task_;
 
   std::function<void(AsyncTaskId)> cancel_task_;
diff --git a/system/vendor_libs/test_vendor_lib/include/event_packet.h b/system/vendor_libs/test_vendor_lib/include/event_packet.h
index f8a8bfc..d7c8268 100644
--- a/system/vendor_libs/test_vendor_lib/include/event_packet.h
+++ b/system/vendor_libs/test_vendor_lib/include/event_packet.h
@@ -76,15 +76,12 @@
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4
   static std::unique_ptr<EventPacket>
   CreateCommandCompleteReadLocalExtendedFeatures(
-      uint8_t status,
-      uint8_t page_number,
-      uint8_t maximum_page_number,
+      uint8_t status, uint8_t page_number, uint8_t maximum_page_number,
       uint64_t extended_lmp_features);
 
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.5
   static std::unique_ptr<EventPacket> CreateCommandCompleteReadBufferSize(
-      uint8_t status,
-      uint16_t hc_acl_data_packet_length,
+      uint8_t status, uint16_t hc_acl_data_packet_length,
       uint8_t hc_synchronous_data_packet_length,
       uint16_t hc_total_num_acl_data_packets,
       uint16_t hc_total_synchronous_data_packets);
@@ -96,8 +93,7 @@
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.8
   static std::unique_ptr<EventPacket>
   CreateCommandCompleteReadLocalSupportedCodecs(
-      uint8_t status,
-      const std::vector<uint8_t>& supported_codecs,
+      uint8_t status, const std::vector<uint8_t>& supported_codecs,
       const std::vector<uint32_t>& vendor_specific_codecs);
 
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.7.2
@@ -110,27 +106,22 @@
   static std::unique_ptr<EventPacket> CreateInquiryResultEvent(
       const BtAddress& bt_address,
       const PageScanRepetitionMode page_scan_repetition_mode,
-      uint32_t class_of_device,
-      uint16_t clock_offset);
+      uint32_t class_of_device, uint16_t clock_offset);
 
   void AddInquiryResult(const BtAddress& bt_address,
                         const PageScanRepetitionMode page_scan_repetition_mode,
-                        uint32_t class_of_device,
-                        uint16_t clock_offset);
+                        uint32_t class_of_device, uint16_t clock_offset);
 
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.7.38
   static std::unique_ptr<EventPacket> CreateExtendedInquiryResultEvent(
       const BtAddress& bt_address,
       const PageScanRepetitionMode page_scan_repetition_mode,
-      uint32_t class_of_device,
-      uint16_t clock_offset,
-      uint8_t rssi,
+      uint32_t class_of_device, uint16_t clock_offset, uint8_t rssi,
       const std::vector<uint8_t>& extended_inquiry_response);
 
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.8.2
   static std::unique_ptr<EventPacket> CreateCommandCompleteLeReadBufferSize(
-      uint8_t status,
-      uint16_t hc_le_data_packet_length,
+      uint8_t status, uint16_t hc_le_data_packet_length,
       uint8_t hc_total_num_le_data_packets);
 
   // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.8.3
diff --git a/system/vendor_libs/test_vendor_lib/include/packet_stream.h b/system/vendor_libs/test_vendor_lib/include/packet_stream.h
index efc9ad3..e2cec7d 100644
--- a/system/vendor_libs/test_vendor_lib/include/packet_stream.h
+++ b/system/vendor_libs/test_vendor_lib/include/packet_stream.h
@@ -55,13 +55,11 @@
   // Attempts to receive |num_octets_to_receive| into |destination| from |fd|,
   // returning false if an error occurs.
   bool ReceiveAll(std::vector<uint8_t>& destination,
-                  size_t num_octets_to_receive,
-                  int fd) const;
+                  size_t num_octets_to_receive, int fd) const;
 
   // Attempts to send |num_octets_to_send| from |source| to |fd|, returning
   // false if an error occurs.
-  bool SendAll(const std::vector<uint8_t>& source,
-               size_t num_octets_to_send,
+  bool SendAll(const std::vector<uint8_t>& source, size_t num_octets_to_send,
                int fd) const;
 };
 
diff --git a/system/vendor_libs/test_vendor_lib/src/async_manager.cc b/system/vendor_libs/test_vendor_lib/src/async_manager.cc
index 7f7746c..5c530ca 100644
--- a/system/vendor_libs/test_vendor_lib/src/async_manager.cc
+++ b/system/vendor_libs/test_vendor_lib/src/async_manager.cc
@@ -181,8 +181,7 @@
   int notifyThread() {
     char buffer = '0';
     if (TEMP_FAILURE_RETRY(write(notification_write_fd_, &buffer, 1)) < 0) {
-      LOG_ERROR(LOG_TAG,
-                "%s: Unable to send message to reading thread",
+      LOG_ERROR(LOG_TAG, "%s: Unable to send message to reading thread",
                 __FUNCTION__);
       return -1;
     }
@@ -209,8 +208,8 @@
   bool consumeThreadNotifications(fd_set& read_fds) {
     if (FD_ISSET(notification_listen_fd_, &read_fds)) {
       char buffer[kNotificationBufferSize];
-      while (TEMP_FAILURE_RETRY(read(
-                 notification_listen_fd_, buffer, kNotificationBufferSize)) ==
+      while (TEMP_FAILURE_RETRY(read(notification_listen_fd_, buffer,
+                                     kNotificationBufferSize)) ==
              kNotificationBufferSize) {
       }
       return true;
@@ -310,8 +309,7 @@
   class Task {
    public:
     Task(std::chrono::steady_clock::time_point time,
-         std::chrono::milliseconds period,
-         const TaskCallback& callback)
+         std::chrono::milliseconds period, const TaskCallback& callback)
         : time(time),
           periodic(true),
           period(period),
@@ -457,8 +455,7 @@
           internal_cond_var_.wait(guard);
         }
         // check for termination right after being notified (and maybe before?)
-        if (!running_)
-          break;
+        if (!running_) break;
       }
     }
   }
@@ -499,8 +496,7 @@
 }
 
 AsyncTaskId AsyncManager::ExecAsyncPeriodically(
-    std::chrono::milliseconds delay,
-    std::chrono::milliseconds period,
+    std::chrono::milliseconds delay, std::chrono::milliseconds period,
     const TaskCallback& callback) {
   return taskManager_p_->ExecAsyncPeriodically(delay, period, callback);
 }
diff --git a/system/vendor_libs/test_vendor_lib/src/bt_address.cc b/system/vendor_libs/test_vendor_lib/src/bt_address.cc
index c7841d4..4a0c4c4 100644
--- a/system/vendor_libs/test_vendor_lib/src/bt_address.cc
+++ b/system/vendor_libs/test_vendor_lib/src/bt_address.cc
@@ -25,16 +25,13 @@
 namespace test_vendor_lib {
 
 bool BtAddress::IsValid(const std::string& addr) {
-  if (addr.length() < kStringLength)
-    return false;
+  if (addr.length() < kStringLength) return false;
 
   for (size_t i = 0; i < kStringLength; i++) {
     if (i % 3 == 2) {  // Every third character must be ':'
-      if (addr[i] != ':')
-        return false;
+      if (addr[i] != ':') return false;
     } else {  // The rest must be hexadecimal digits
-      if (!isxdigit(addr[i]))
-        return false;
+      if (!isxdigit(addr[i])) return false;
     }
   }
   return true;
@@ -44,8 +41,7 @@
   std::string tok;
   std::istringstream iss(str);
 
-  if (IsValid(str) == false)
-    return false;
+  if (IsValid(str) == false) return false;
 
   address_ = 0;
   for (size_t i = 0; i < kOctets; i++) {
@@ -57,8 +53,7 @@
 }
 
 bool BtAddress::FromVector(const vector<uint8_t>& octets) {
-  if (octets.size() < kOctets)
-    return false;
+  if (octets.size() < kOctets) return false;
 
   address_ = 0;
   for (size_t i = 0; i < kOctets; i++) {
@@ -81,8 +76,7 @@
   for (size_t i = 0; i < kOctets; i++) {
     uint64_t octet = (address_ >> (8 * ((kOctets - 1) - i))) & 0xff;
     ss << std::hex << std::setfill('0') << std::setw(2) << octet;
-    if (i != kOctets - 1)
-      ss << std::string(":");
+    if (i != kOctets - 1) ss << std::string(":");
   }
 
   return ss.str();
diff --git a/system/vendor_libs/test_vendor_lib/src/bt_vendor.cc b/system/vendor_libs/test_vendor_lib/src/bt_vendor.cc
index 90814a0..b078505 100644
--- a/system/vendor_libs/test_vendor_lib/src/bt_vendor.cc
+++ b/system/vendor_libs/test_vendor_lib/src/bt_vendor.cc
@@ -72,8 +72,8 @@
       case BT_VND_OP_USERIAL_CLOSE:
         LOG_INFO(LOG_TAG, "Doing op: BT_VND_OP_USERIAL_CLOSE");
         CHECK(vendor_manager_);
-        LOG_INFO(
-            LOG_TAG, "Closing HCI's fd (fd: %d)", vendor_manager_->GetHciFd());
+        LOG_INFO(LOG_TAG, "Closing HCI's fd (fd: %d)",
+                 vendor_manager_->GetHciFd());
         vendor_manager_->CloseHciFd();
         return 1;
 
@@ -139,7 +139,5 @@
 // Entry point of DLib.
 EXPORT_SYMBOL
 const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE = {
-    sizeof(bt_vendor_interface_t),
-    test_vendor_lib::BtVendor::Initialize,
-    test_vendor_lib::BtVendor::Op,
-    test_vendor_lib::BtVendor::CleanUp};
+    sizeof(bt_vendor_interface_t), test_vendor_lib::BtVendor::Initialize,
+    test_vendor_lib::BtVendor::Op, test_vendor_lib::BtVendor::CleanUp};
diff --git a/system/vendor_libs/test_vendor_lib/src/command_packet.cc b/system/vendor_libs/test_vendor_lib/src/command_packet.cc
index b6b09b8..79935dc 100644
--- a/system/vendor_libs/test_vendor_lib/src/command_packet.cc
+++ b/system/vendor_libs/test_vendor_lib/src/command_packet.cc
@@ -30,9 +30,8 @@
     : Packet(DATA_TYPE_COMMAND, std::move(header)) {}
 
 CommandPacket::CommandPacket(uint16_t opcode)
-    : Packet(
-          DATA_TYPE_COMMAND,
-          {static_cast<uint8_t>(opcode), static_cast<uint8_t>(opcode >> 8)}) {}
+    : Packet(DATA_TYPE_COMMAND, {static_cast<uint8_t>(opcode),
+                                 static_cast<uint8_t>(opcode >> 8)}) {}
 
 CommandPacket::CommandPacket(vector<uint8_t> header, vector<uint8_t> payload)
     : Packet(DATA_TYPE_COMMAND, std::move(header)) {
@@ -43,12 +42,8 @@
   return 0 | (GetHeader()[0] | (GetHeader()[1] << 8));
 }
 
-uint8_t CommandPacket::GetOGF() const {
-  return HCI_OGF(GetOpcode());
-}
+uint8_t CommandPacket::GetOGF() const { return HCI_OGF(GetOpcode()); }
 
-uint16_t CommandPacket::GetOCF() const {
-  return HCI_OCF(GetOpcode());
-}
+uint16_t CommandPacket::GetOCF() const { return HCI_OCF(GetOpcode()); }
 
 }  // namespace test_vendor_lib
diff --git a/system/vendor_libs/test_vendor_lib/src/dual_mode_controller.cc b/system/vendor_libs/test_vendor_lib/src/dual_mode_controller.cc
index f8cd3de..1db4b2e 100644
--- a/system/vendor_libs/test_vendor_lib/src/dual_mode_controller.cc
+++ b/system/vendor_libs/test_vendor_lib/src/dual_mode_controller.cc
@@ -176,8 +176,8 @@
 
 void DualModeController::RegisterPeriodicTaskScheduler(
     std::function<AsyncTaskId(std::chrono::milliseconds,
-                              std::chrono::milliseconds,
-                              const TaskCallback&)> periodicScheduler) {
+                              std::chrono::milliseconds, const TaskCallback&)>
+        periodicScheduler) {
   schedule_periodic_task_ = periodicScheduler;
 }
 
@@ -188,8 +188,7 @@
 
 void DualModeController::HandleTestChannelCommand(
     const std::string& name, const vector<std::string>& args) {
-  if (active_test_channel_commands_.count(name) == 0)
-    return;
+  if (active_test_channel_commands_.count(name) == 0) return;
   active_test_channel_commands_[name](args);
 }
 
@@ -215,16 +214,14 @@
 
 void DualModeController::HandleTimerTick() {
   // PageScan();
-  if (le_scan_enable_)
-    LOG_ERROR(LOG_TAG, "LE scan");
+  if (le_scan_enable_) LOG_ERROR(LOG_TAG, "LE scan");
   // LeScan();
 }
 
 void DualModeController::SetTimerPeriod(std::chrono::milliseconds new_period) {
   timer_period_ = new_period;
 
-  if (timer_tick_task_ == kInvalidTaskId)
-    return;
+  if (timer_tick_task_ == kInvalidTaskId) return;
 
   // Restart the timer with the new period
   StopTimer();
@@ -234,9 +231,8 @@
 void DualModeController::StartTimer() {
   LOG_ERROR(LOG_TAG, "StartTimer");
   timer_tick_task_ = schedule_periodic_task_(
-      std::chrono::milliseconds(0), timer_period_, [this]() {
-        DualModeController::HandleTimerTick();
-      });
+      std::chrono::milliseconds(0), timer_period_,
+      [this]() { DualModeController::HandleTimerTick(); });
 }
 
 void DualModeController::StopTimer() {
@@ -298,8 +294,7 @@
   LogCommand("Read Buffer Size");
   std::unique_ptr<EventPacket> command_complete =
       EventPacket::CreateCommandCompleteReadBufferSize(
-          kSuccessStatus,
-          properties_.GetAclDataPacketSize(),
+          kSuccessStatus, properties_.GetAclDataPacketSize(),
           properties_.GetSynchronousDataPacketSize(),
           properties_.GetTotalNumAclDataPackets(),
           properties_.GetTotalNumSynchronousDataPackets());
@@ -318,11 +313,8 @@
   LogCommand("Read Local Version Information");
   std::unique_ptr<EventPacket> command_complete =
       EventPacket::CreateCommandCompleteReadLocalVersionInformation(
-          kSuccessStatus,
-          properties_.GetVersion(),
-          properties_.GetRevision(),
-          properties_.GetLmpPalVersion(),
-          properties_.GetManufacturerName(),
+          kSuccessStatus, properties_.GetVersion(), properties_.GetRevision(),
+          properties_.GetLmpPalVersion(), properties_.GetManufacturerName(),
           properties_.GetLmpPalSubversion());
   send_event_(std::move(command_complete));
 }
@@ -349,8 +341,7 @@
   LogCommand("Read Local Supported Codecs");
   std::unique_ptr<EventPacket> command_complete =
       EventPacket::CreateCommandCompleteReadLocalSupportedCodecs(
-          kSuccessStatus,
-          properties_.GetSupportedCodecs(),
+          kSuccessStatus, properties_.GetSupportedCodecs(),
           properties_.GetVendorSpecificCodecs());
   send_event_(std::move(command_complete));
 }
@@ -361,8 +352,7 @@
   CHECK(args.size() == 2);
   std::unique_ptr<EventPacket> command_complete =
       EventPacket::CreateCommandCompleteReadLocalExtendedFeatures(
-          kSuccessStatus,
-          args[1],
+          kSuccessStatus, args[1],
           properties_.GetLocalExtendedFeaturesMaximumPageNumber(),
           properties_.GetLocalExtendedFeatures(args[1]));
   send_event_(std::move(command_complete));
@@ -491,8 +481,7 @@
       std::unique_ptr<EventPacket> inquiry_result_evt =
           EventPacket::CreateInquiryResultEvent(other_addr,
                                                 kPageScanRepetitionMode,
-                                                kClassOfDevice,
-                                                kClockOffset);
+                                                kClassOfDevice, kClockOffset);
       send_event_(std::move(inquiry_result_evt));
       /* TODO: Return responses from modeled devices */
     } break;
@@ -511,13 +500,9 @@
       extended_inquiry_data.push_back('\0');
 
       uint8_t rssi = static_cast<uint8_t>(-20);
-      send_event_(
-          EventPacket::CreateExtendedInquiryResultEvent(other_addr,
-                                                        kPageScanRepetitionMode,
-                                                        kClassOfDevice,
-                                                        kClockOffset,
-                                                        rssi,
-                                                        extended_inquiry_data));
+      send_event_(EventPacket::CreateExtendedInquiryResultEvent(
+          other_addr, kPageScanRepetitionMode, kClassOfDevice, kClockOffset,
+          rssi, extended_inquiry_data));
       /* TODO: Return responses from modeled devices */
     } break;
   }
@@ -565,8 +550,7 @@
     UNUSED_ATTR const vector<uint8_t>& args) {
   std::unique_ptr<EventPacket> command_complete =
       EventPacket::CreateCommandCompleteLeReadBufferSize(
-          kSuccessStatus,
-          properties_.GetLeDataPacketLength(),
+          kSuccessStatus, properties_.GetLeDataPacketLength(),
           properties_.GetTotalNumLeDataPackets());
   send_event_(std::move(command_complete));
 }
@@ -582,8 +566,8 @@
 void DualModeController::HciLeSetRandomAddress(const vector<uint8_t>& args) {
   LogCommand("LE SetRandomAddress");
   CHECK(args.size() == 7);
-  vector<uint8_t> new_addr = {
-      args[1], args[2], args[3], args[4], args[5], args[6]};
+  vector<uint8_t> new_addr = {args[1], args[2], args[3],
+                              args[4], args[5], args[6]};
   CHECK(le_random_address_.FromVector(new_addr));
   SendCommandCompleteSuccess(HCI_BLE_WRITE_RANDOM_ADDR);
 }
@@ -708,28 +692,15 @@
   supported_codecs_ = {1};
   vendor_specific_codecs_ = {};
 
-  for (int i = 0; i < 64; i++)
-    local_supported_commands_.push_back(0xff);
+  for (int i = 0; i < 64; i++) local_supported_commands_.push_back(0xff);
 
   le_supported_features_ = 0x1f;
   le_supported_states_ = 0x3ffffffffff;
-  le_vendor_cap_ = {0x05,
-                    0x01,
-                    0x00,
-                    0x04,
-                    0x80,
-                    0x01,
-                    0x10,
-                    0x01,
-                    0x60,
-                    0x00,
-                    0x0a,
-                    0x00,
-                    0x01,
-                    0x01};
+  le_vendor_cap_ = {0x05, 0x01, 0x00, 0x04, 0x80, 0x01, 0x10,
+                    0x01, 0x60, 0x00, 0x0a, 0x00, 0x01, 0x01};
 
-  LOG_INFO(
-      LOG_TAG, "Reading controller properties from %s.", file_name.c_str());
+  LOG_INFO(LOG_TAG, "Reading controller properties from %s.",
+           file_name.c_str());
   if (!base::ReadFileToString(base::FilePath(file_name), &properties_raw)) {
     LOG_ERROR(LOG_TAG, "Error reading controller properties from file.");
     return;
diff --git a/system/vendor_libs/test_vendor_lib/src/event_packet.cc b/system/vendor_libs/test_vendor_lib/src/event_packet.cc
index 3aa962b..98802b0 100644
--- a/system/vendor_libs/test_vendor_lib/src/event_packet.cc
+++ b/system/vendor_libs/test_vendor_lib/src/event_packet.cc
@@ -28,9 +28,7 @@
 EventPacket::EventPacket(uint8_t event_code)
     : Packet(DATA_TYPE_EVENT, {event_code}) {}
 
-uint8_t EventPacket::GetEventCode() const {
-  return GetHeader()[0];
-}
+uint8_t EventPacket::GetEventCode() const { return GetHeader()[0]; }
 
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.7.1
 std::unique_ptr<EventPacket> EventPacket::CreateInquiryCompleteEvent(
@@ -100,11 +98,8 @@
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.1
 std::unique_ptr<EventPacket>
 EventPacket::CreateCommandCompleteReadLocalVersionInformation(
-    uint8_t status,
-    uint8_t hci_version,
-    uint16_t hci_revision,
-    uint8_t lmp_pal_version,
-    uint16_t manufacturer_name,
+    uint8_t status, uint8_t hci_version, uint16_t hci_revision,
+    uint8_t lmp_pal_version, uint16_t manufacturer_name,
     uint16_t lmp_pal_subversion) {
   std::unique_ptr<EventPacket> evt_ptr =
       EventPacket::CreateCommandCompleteOnlyStatusEvent(
@@ -135,9 +130,7 @@
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.4
 std::unique_ptr<EventPacket>
 EventPacket::CreateCommandCompleteReadLocalExtendedFeatures(
-    uint8_t status,
-    uint8_t page_number,
-    uint8_t maximum_page_number,
+    uint8_t status, uint8_t page_number, uint8_t maximum_page_number,
     uint64_t extended_lmp_features) {
   std::unique_ptr<EventPacket> evt_ptr =
       EventPacket::CreateCommandCompleteOnlyStatusEvent(
@@ -152,8 +145,7 @@
 
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.5
 std::unique_ptr<EventPacket> EventPacket::CreateCommandCompleteReadBufferSize(
-    uint8_t status,
-    uint16_t hc_acl_data_packet_length,
+    uint8_t status, uint16_t hc_acl_data_packet_length,
     uint8_t hc_synchronous_data_packet_length,
     uint16_t hc_total_num_acl_data_packets,
     uint16_t hc_total_synchronous_data_packets) {
@@ -184,8 +176,7 @@
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.4.8
 std::unique_ptr<EventPacket>
 EventPacket::CreateCommandCompleteReadLocalSupportedCodecs(
-    uint8_t status,
-    const vector<uint8_t>& supported_codecs,
+    uint8_t status, const vector<uint8_t>& supported_codecs,
     const vector<uint32_t>& vendor_specific_codecs) {
   std::unique_ptr<EventPacket> evt_ptr =
       EventPacket::CreateCommandCompleteOnlyStatusEvent(
@@ -201,8 +192,7 @@
 std::unique_ptr<EventPacket> EventPacket::CreateInquiryResultEvent(
     const BtAddress& address,
     const PageScanRepetitionMode page_scan_repetition_mode,
-    uint32_t class_of_device,
-    uint16_t clock_offset) {
+    uint32_t class_of_device, uint16_t clock_offset) {
   std::unique_ptr<EventPacket> evt_ptr =
       std::unique_ptr<EventPacket>(new EventPacket(HCI_INQUIRY_RESULT_EVT));
 
@@ -221,8 +211,7 @@
 void EventPacket::AddInquiryResult(
     const BtAddress& address,
     const PageScanRepetitionMode page_scan_repetition_mode,
-    uint32_t class_of_device,
-    uint16_t clock_offset) {
+    uint32_t class_of_device, uint16_t clock_offset) {
   CHECK(GetEventCode() == HCI_INQUIRY_RESULT_EVT);
 
   CHECK(IncrementPayloadCounter(1));  // Increment the number of responses
@@ -238,9 +227,7 @@
 std::unique_ptr<EventPacket> EventPacket::CreateExtendedInquiryResultEvent(
     const BtAddress& address,
     const PageScanRepetitionMode page_scan_repetition_mode,
-    uint32_t class_of_device,
-    uint16_t clock_offset,
-    uint8_t rssi,
+    uint32_t class_of_device, uint16_t clock_offset, uint8_t rssi,
     const vector<uint8_t>& extended_inquiry_response) {
   std::unique_ptr<EventPacket> evt_ptr = std::unique_ptr<EventPacket>(
       new EventPacket(HCI_EXTENDED_INQUIRY_RESULT_EVT));
@@ -263,8 +250,7 @@
 
 // Bluetooth Core Specification Version 4.2, Volume 2, Part E, Section 7.8.2
 std::unique_ptr<EventPacket> EventPacket::CreateCommandCompleteLeReadBufferSize(
-    uint8_t status,
-    uint16_t hc_le_data_packet_length,
+    uint8_t status, uint16_t hc_le_data_packet_length,
     uint8_t hc_total_num_le_data_packets) {
   std::unique_ptr<EventPacket> evt_ptr =
       EventPacket::CreateCommandCompleteOnlyStatusEvent(
diff --git a/system/vendor_libs/test_vendor_lib/src/hci_transport.cc b/system/vendor_libs/test_vendor_lib/src/hci_transport.cc
index bdc3acf..92bf7a5 100644
--- a/system/vendor_libs/test_vendor_lib/src/hci_transport.cc
+++ b/system/vendor_libs/test_vendor_lib/src/hci_transport.cc
@@ -28,28 +28,19 @@
 
 HciTransport::HciTransport() = default;
 
-void HciTransport::CloseHciFd() {
-  hci_fd_.reset(nullptr);
-}
+void HciTransport::CloseHciFd() { hci_fd_.reset(nullptr); }
 
-void HciTransport::CloseVendorFd() {
-  vendor_fd_.reset(nullptr);
-}
+void HciTransport::CloseVendorFd() { vendor_fd_.reset(nullptr); }
 
-int HciTransport::GetHciFd() const {
-  return hci_fd_->get();
-}
+int HciTransport::GetHciFd() const { return hci_fd_->get(); }
 
-int HciTransport::GetVendorFd() const {
-  return vendor_fd_->get();
-}
+int HciTransport::GetVendorFd() const { return vendor_fd_->get(); }
 
 bool HciTransport::SetUp() {
   int socketpair_fds[2];
 
   const int success = socketpair(AF_LOCAL, SOCK_STREAM, 0, socketpair_fds);
-  if (success < 0)
-    return false;
+  if (success < 0) return false;
   hci_fd_.reset(new base::ScopedFD(socketpair_fds[0]));
   vendor_fd_.reset(new base::ScopedFD(socketpair_fds[1]));
   return true;
diff --git a/system/vendor_libs/test_vendor_lib/src/packet.cc b/system/vendor_libs/test_vendor_lib/src/packet.cc
index 23be2a9..2972ada 100644
--- a/system/vendor_libs/test_vendor_lib/src/packet.cc
+++ b/system/vendor_libs/test_vendor_lib/src/packet.cc
@@ -33,11 +33,9 @@
 }
 
 bool Packet::AddPayloadOctets(size_t octets, const vector<uint8_t>& bytes) {
-  if (octets + payload_.size() > kMaxPacketOctets)
-    return false;
+  if (octets + payload_.size() > kMaxPacketOctets) return false;
 
-  if (octets != bytes.size())
-    return false;
+  if (octets != bytes.size()) return false;
 
   payload_.insert(payload_.end(), bytes.begin(), bytes.end());
   payload_[0] = payload_.size() - 1;
@@ -50,23 +48,20 @@
 
   uint64_t v = value;
 
-  if (octets > sizeof(uint64_t))
-    return false;
+  if (octets > sizeof(uint64_t)) return false;
 
   for (size_t i = 0; i < octets; i++) {
     val_vector.push_back(v & 0xff);
     v = v >> 8;
   }
 
-  if (v != 0)
-    return false;
+  if (v != 0) return false;
 
   return AddPayloadOctets(octets, val_vector);
 }
 
 bool Packet::AddPayloadBtAddress(const BtAddress& address) {
-  if (BtAddress::kOctets + payload_.size() > kMaxPacketOctets)
-    return false;
+  if (BtAddress::kOctets + payload_.size() > kMaxPacketOctets) return false;
 
   address.ToVector(payload_);
 
@@ -76,19 +71,16 @@
 }
 
 bool Packet::IncrementPayloadCounter(size_t index) {
-  if (payload_.size() < index - 1)
-    return false;
+  if (payload_.size() < index - 1) return false;
 
   payload_[index]++;
   return true;
 }
 
 bool Packet::IncrementPayloadCounter(size_t index, uint8_t max_val) {
-  if (payload_.size() < index - 1)
-    return false;
+  if (payload_.size() < index - 1) return false;
 
-  if (payload_[index] + 1 > max_val)
-    return false;
+  if (payload_[index] + 1 > max_val) return false;
 
   payload_[index]++;
   return true;
@@ -100,25 +92,17 @@
   return header_;
 }
 
-uint8_t Packet::GetHeaderSize() const {
-  return header_.size();
-}
+uint8_t Packet::GetHeaderSize() const { return header_.size(); }
 
 size_t Packet::GetPacketSize() const {
   // Add one for the type octet.
   return 1 + header_.size() + payload_.size();
 }
 
-const vector<uint8_t>& Packet::GetPayload() const {
-  return payload_;
-}
+const vector<uint8_t>& Packet::GetPayload() const { return payload_; }
 
-size_t Packet::GetPayloadSize() const {
-  return payload_.size();
-}
+size_t Packet::GetPayloadSize() const { return payload_.size(); }
 
-serial_data_type_t Packet::GetType() const {
-  return type_;
-}
+serial_data_type_t Packet::GetType() const { return type_; }
 
 }  // namespace test_vendor_lib
diff --git a/system/vendor_libs/test_vendor_lib/src/packet_stream.cc b/system/vendor_libs/test_vendor_lib/src/packet_stream.cc
index 489a640..428afaf 100644
--- a/system/vendor_libs/test_vendor_lib/src/packet_stream.cc
+++ b/system/vendor_libs/test_vendor_lib/src/packet_stream.cc
@@ -100,32 +100,27 @@
 }
 
 bool PacketStream::ReceiveAll(vector<uint8_t>& destination,
-                              size_t num_octets_to_receive,
-                              int fd) const {
+                              size_t num_octets_to_receive, int fd) const {
   destination.resize(num_octets_to_receive);
   size_t octets_remaining = num_octets_to_receive;
   while (octets_remaining > 0) {
     const int num_octets_received =
-        read(fd,
-             &destination[num_octets_to_receive - octets_remaining],
+        read(fd, &destination[num_octets_to_receive - octets_remaining],
              octets_remaining);
-    if (num_octets_received < 0)
-      return false;
+    if (num_octets_received < 0) return false;
     octets_remaining -= num_octets_received;
   }
   return true;
 }
 
 bool PacketStream::SendAll(const vector<uint8_t>& source,
-                           size_t num_octets_to_send,
-                           int fd) const {
+                           size_t num_octets_to_send, int fd) const {
   CHECK(source.size() >= num_octets_to_send);
   size_t octets_remaining = num_octets_to_send;
   while (octets_remaining > 0) {
     const int num_octets_sent = write(
         fd, &source[num_octets_to_send - octets_remaining], octets_remaining);
-    if (num_octets_sent < 0)
-      return false;
+    if (num_octets_sent < 0) return false;
     octets_remaining -= num_octets_sent;
   }
   return true;
diff --git a/system/vendor_libs/test_vendor_lib/src/test_channel_transport.cc b/system/vendor_libs/test_vendor_lib/src/test_channel_transport.cc
index 657cbdb..7c1963a 100644
--- a/system/vendor_libs/test_vendor_lib/src/test_channel_transport.cc
+++ b/system/vendor_libs/test_vendor_lib/src/test_channel_transport.cc
@@ -46,8 +46,7 @@
   listen_address.sin_port = htons(port);
   listen_address.sin_addr.s_addr = htonl(INADDR_ANY);
 
-  if (bind(listen_fd_,
-           reinterpret_cast<sockaddr*>(&listen_address),
+  if (bind(listen_fd_, reinterpret_cast<sockaddr*>(&listen_address),
            sockaddr_in_size) < 0) {
     LOG_INFO(LOG_TAG, "Error binding test channel listener socket to address.");
     close(listen_fd_);
@@ -78,15 +77,12 @@
   socklen_t sockaddr_in_size = sizeof(struct sockaddr_in);
   memset(&test_channel_address, 0, sockaddr_in_size);
 
-  OSI_NO_INTR(accept_fd =
-                  accept(listen_fd_,
-                         reinterpret_cast<sockaddr*>(&test_channel_address),
-                         &sockaddr_in_size));
+  OSI_NO_INTR(accept_fd = accept(listen_fd_, reinterpret_cast<sockaddr*>(
+                                                 &test_channel_address),
+                                 &sockaddr_in_size));
   if (accept_fd < 0) {
-    LOG_INFO(LOG_TAG,
-             "Error accepting test channel connection errno=%d (%s).",
-             errno,
-             strerror(errno));
+    LOG_INFO(LOG_TAG, "Error accepting test channel connection errno=%d (%s).",
+             errno, strerror(errno));
 
     if (errno != EAGAIN && errno != EWOULDBLOCK) {
       LOG_ERROR(LOG_TAG, "Closing listen_fd_ (won't try again).");
@@ -108,8 +104,8 @@
   command_name_raw.resize(command_name_size);
   read(fd, &command_name_raw[0], command_name_size);
   std::string command_name(command_name_raw.begin(), command_name_raw.end());
-  LOG_INFO(
-      LOG_TAG, "Received command from test channel: %s", command_name.data());
+  LOG_INFO(LOG_TAG, "Received command from test channel: %s",
+           command_name.data());
 
   if (command_name == "CLOSE_TEST_CHANNEL" || command_name == "") {
     LOG_INFO(LOG_TAG, "Test channel closed");
diff --git a/system/vendor_libs/test_vendor_lib/src/vendor_manager.cc b/system/vendor_libs/test_vendor_lib/src/vendor_manager.cc
index 48a2c14..1651ab3 100644
--- a/system/vendor_libs/test_vendor_lib/src/vendor_manager.cc
+++ b/system/vendor_libs/test_vendor_lib/src/vendor_manager.cc
@@ -28,9 +28,7 @@
 
 VendorManager* g_manager = nullptr;
 
-void VendorManager::CleanUp() {
-  test_channel_transport_.CleanUp();
-}
+void VendorManager::CleanUp() { test_channel_transport_.CleanUp(); }
 
 bool VendorManager::Initialize() {
   if (!transport_.SetUp()) {
@@ -66,8 +64,7 @@
       });
 
   controller_.RegisterPeriodicTaskScheduler(
-      [this](std::chrono::milliseconds delay,
-             std::chrono::milliseconds period,
+      [this](std::chrono::milliseconds delay, std::chrono::milliseconds period,
              const TaskCallback& task) {
         return async_manager_.ExecAsyncPeriodically(delay, period, task);
       });
@@ -113,12 +110,8 @@
   });
 }
 
-void VendorManager::CloseHciFd() {
-  transport_.CloseHciFd();
-}
+void VendorManager::CloseHciFd() { transport_.CloseHciFd(); }
 
-int VendorManager::GetHciFd() const {
-  return transport_.GetHciFd();
-}
+int VendorManager::GetHciFd() const { return transport_.GetHciFd(); }
 
 }  // namespace test_vendor_lib
diff --git a/system/vendor_libs/test_vendor_lib/test/hci_transport_unittest.cc b/system/vendor_libs/test_vendor_lib/test/hci_transport_unittest.cc
index fe5688f..e91790a 100644
--- a/system/vendor_libs/test_vendor_lib/test/hci_transport_unittest.cc
+++ b/system/vendor_libs/test_vendor_lib/test/hci_transport_unittest.cc
@@ -31,8 +31,7 @@
 namespace {
 const vector<uint8_t> stub_command({DATA_TYPE_COMMAND,
                                     static_cast<uint8_t>(HCI_RESET),
-                                    static_cast<uint8_t>(HCI_RESET >> 8),
-                                    0});
+                                    static_cast<uint8_t>(HCI_RESET >> 8), 0});
 
 const int kMultiIterations = 10000;
 
diff --git a/system/vendor_libs/test_vendor_lib/test/packet_stream_unittest.cc b/system/vendor_libs/test_vendor_lib/test/packet_stream_unittest.cc
index c1bc20b..3908b9e 100644
--- a/system/vendor_libs/test_vendor_lib/test/packet_stream_unittest.cc
+++ b/system/vendor_libs/test_vendor_lib/test/packet_stream_unittest.cc
@@ -63,8 +63,7 @@
     packet.push_back(payload_size);
 
     // Set the packet's payload.
-    for (int i = 0; i < payload_size; ++i)
-      packet.push_back(payload[i]);
+    for (int i = 0; i < payload_size; ++i) packet.push_back(payload[i]);
 
     // Send the packet to |packet_stream_|.
     write(socketpair_fds_[1], &packet[1], packet.size());