am 27c93b25: am 46bfe63d: DO NOT MERGE AVRCP: Proper handling of Fragmented AVCTP packet automerge: f9336d3  -s ours

* commit '27c93b253feaea8f5144d3e8957478575c4df13c':
diff --git a/btif/src/btif_gatt_multi_adv_util.c b/btif/src/btif_gatt_multi_adv_util.c
old mode 100755
new mode 100644
index 68fc3ba..b8f9233
--- a/btif/src/btif_gatt_multi_adv_util.c
+++ b/btif/src/btif_gatt_multi_adv_util.c
@@ -47,13 +47,11 @@
 
 btgatt_multi_adv_common_data *btif_obtain_multi_adv_data_cb()
 {
-    if(0 == BTM_BleMaxMultiAdvInstanceCount())
-    {
-        BTIF_TRACE_WARNING("%s - No instances found", __FUNCTION__);
-        return NULL;
-    }
+    int max_adv_inst = BTM_BleMaxMultiAdvInstanceCount();
+    if (0 == max_adv_inst)
+        max_adv_inst = 1;
 
-    BTIF_TRACE_DEBUG("%s, Count:%d", __FUNCTION__, BTM_BleMaxMultiAdvInstanceCount());
+    BTIF_TRACE_DEBUG("%s, Count:%d", __FUNCTION__, max_adv_inst);
     if (NULL == p_multi_adv_com_data_cb)
     {
         BTIF_TRACE_DEBUG("Initializing in %s", __FUNCTION__);
@@ -64,16 +62,16 @@
 
             /* Storing both client_if and inst_id details */
             p_multi_adv_com_data_cb->clntif_map =
-                  GKI_getbuf(( BTM_BleMaxMultiAdvInstanceCount() * INST_ID_IDX_MAX)* sizeof(INT8));
+                  GKI_getbuf(( max_adv_inst * INST_ID_IDX_MAX)* sizeof(INT8));
             memset(p_multi_adv_com_data_cb->clntif_map, 0 ,
-                  ( BTM_BleMaxMultiAdvInstanceCount() * INST_ID_IDX_MAX)* sizeof(INT8));
+                  ( max_adv_inst * INST_ID_IDX_MAX)* sizeof(INT8));
 
-            p_multi_adv_com_data_cb->inst_cb = GKI_getbuf(( BTM_BleMaxMultiAdvInstanceCount() + 1 )
+            p_multi_adv_com_data_cb->inst_cb = GKI_getbuf(( max_adv_inst + 1 )
                                               * sizeof(btgatt_multi_adv_inst_cb));
             memset(p_multi_adv_com_data_cb->inst_cb, 0 ,
-                 ( BTM_BleMaxMultiAdvInstanceCount() + 1) * sizeof(btgatt_multi_adv_inst_cb));
+                 ( max_adv_inst + 1) * sizeof(btgatt_multi_adv_inst_cb));
 
-            for (int i=0; i < BTM_BleMaxMultiAdvInstanceCount()*2; i += 2)
+            for (int i=0; i < max_adv_inst * 2; i += 2)
             {
                 p_multi_adv_com_data_cb->clntif_map[i] = INVALID_ADV_INST;
                 p_multi_adv_com_data_cb->clntif_map[i+1] = INVALID_ADV_INST;
diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c
index a6f095f..8549fcd 100644
--- a/stack/btm/btm_ble_gap.c
+++ b/stack/btm/btm_ble_gap.c
@@ -644,16 +644,12 @@
 
     if (match_rec)
     {
-        BTM_TRACE_ERROR("Random match");
+        BTM_TRACE_DEBUG("Random match");
         match_rec->ble.active_addr_type = BTM_BLE_ADDR_RRA;
         memcpy(match_rec->ble.cur_rand_addr, bda, BD_ADDR_LEN);
         memcpy(bda, match_rec->bd_addr, BD_ADDR_LEN);
         addr_type = match_rec->ble.ble_addr_type;
     }
-    else
-    {
-        BTM_TRACE_ERROR("Random unmatch");
-    }
 
     btm_ble_process_adv_pkt_cont(bda, addr_type, evt_type, pp);
 
@@ -2437,7 +2433,7 @@
 #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
     /* map address to security record */
     btm_public_addr_to_random_pseudo(bda, &addr_type);
-    BTM_TRACE_ERROR("new address: %02x:%02x:%02x:%02x:%02x:%02x",
+    BTM_TRACE_DEBUG("new address: %02x:%02x:%02x:%02x:%02x:%02x",
                      bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
 #endif