From c589a11c911f4f52c6a57be9135a3b02f6f01935 Mon Sep 17 00:00:00 2001
From: Henri Chataing <henrichataing@google.com>
Date: Fri, 1 Dec 2023 10:38:01 -0800
Subject: [PATCH] Remove use of multiline \ in format strings

Test: m com.android.btservices
Bug: 305066880
Change-Id: I5727a458b547996422f6b4433835b1c8277d7043
---
 system/gd/hal/snoop_logger.cc   | 10 +++++-----
 system/stack/avrc/avrc_api.cc   |  4 ++--
 system/stack/btm/btm_ble_sec.cc |  3 +--
 system/stack/l2cap/l2c_utils.cc |  4 ++--
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/system/gd/hal/snoop_logger.cc b/system/gd/hal/snoop_logger.cc
index f4753542d78..54343e2dcf9 100644
--- a/system/gd/hal/snoop_logger.cc
+++ b/system/gd/hal/snoop_logger.cc
@@ -214,11 +214,11 @@ void ProfilesFilter::PrintProfilesConfig() {
   for (int i = 0; i < FILTER_PROFILE_MAX; i++) {
     if (profiles[i].enabled) {
       LOG_DEBUG(
-          "\ntype: %s \
-                \nenabled: %d, l2cap_opened: %d, rfcomm_opened: %d\
-                \nflow_ext_l2cap: %d, flow_ext_rfcomm: %d\
-                \nlcid: %d, rcid: %d, rfcomm_uuid: %d, psm: %d\
-                \nscn: %d \n",
+          "\ntype: %s"
+          "\nenabled: %d, l2cap_opened: %d, rfcomm_opened: %d"
+          "\nflow_ext_l2cap: %d, flow_ext_rfcomm: %d"
+          "\nlcid: %d, rcid: %d, rfcomm_uuid: %d, psm: %d"
+          "\nscn: %d\n",
           ProfilesFilter::ProfileToString(profiles[i].type).c_str(),
           profiles[i].enabled,
           profiles[i].l2cap_opened,
diff --git a/system/stack/avrc/avrc_api.cc b/system/stack/avrc/avrc_api.cc
index c3fe1d329b6..33cd9d39c00 100644
--- a/system/stack/avrc/avrc_api.cc
+++ b/system/stack/avrc/avrc_api.cc
@@ -530,8 +530,8 @@ static uint8_t avrc_proc_far_msg(uint8_t handle, uint8_t label, uint8_t cr,
       /* Received a CONTINUE/END, but no corresponding START
                       (or previous fragmented response was dropped) */
       LOG_VERBOSE(
-          "Received a CONTINUE/END without no corresponding START \
-                                (or previous fragmented response was dropped)");
+          "Received a CONTINUE/END without no corresponding START"
+          " (or previous fragmented response was dropped)");
       drop_code = 5;
       osi_free(p_pkt);
       *pp_pkt = NULL;
diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc
index b8d8ac2017f..9336d9ce43e 100644
--- a/system/stack/btm/btm_ble_sec.cc
+++ b/system/stack/btm/btm_ble_sec.cc
@@ -411,8 +411,7 @@ void BTM_BleSetPrefConnParams(const RawAddress& bd_addr, uint16_t min_conn_int,
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
   LOG_VERBOSE(
-      "BTM_BleSetPrefConnParams min: %u  max: %u  latency: %u  \
-                    tout: %u",
+      "BTM_BleSetPrefConnParams min: %u  max: %u  latency: %u tout: %u",
       min_conn_int, max_conn_int, peripheral_latency, supervision_tout);
 
   if (BTM_BLE_ISVALID_PARAM(min_conn_int, BTM_BLE_CONN_INT_MIN,
diff --git a/system/stack/l2cap/l2c_utils.cc b/system/stack/l2cap/l2c_utils.cc
index 0f4595c7638..eefc9a57889 100644
--- a/system/stack/l2cap/l2c_utils.cc
+++ b/system/stack/l2cap/l2c_utils.cc
@@ -2950,8 +2950,8 @@ void l2cu_send_peer_ble_credit_based_conn_req(tL2C_CCB* p_ccb) {
   initial_credit = p_ccb->local_conn_cfg.credits;
 
   LOG_VERBOSE(
-      "l2cu_send_peer_ble_credit_based_conn_req PSM:0x%04x local_cid:%d\
-                mtu:%d mps:%d initial_credit:%d",
+      "l2cu_send_peer_ble_credit_based_conn_req PSM:0x%04x local_cid:%d"
+      " mtu:%d mps:%d initial_credit:%d",
       p_ccb->p_rcb->real_psm, p_ccb->local_cid, mtu, mps, initial_credit);
 
   UINT16_TO_STREAM(p, p_ccb->p_rcb->real_psm);
-- 
GitLab