From f8ad8d023e641ad365496043ea379da5f3ec42f0 Mon Sep 17 00:00:00 2001
From: Chris Manton <cmanton@google.com>
Date: Fri, 8 Oct 2021 15:43:05 -0700
Subject: [PATCH] legacy: Globalize to prepare refactor bta/pan/bta_pan_main

Bug: 187824969
Tag: #refactor
Test: gd/cert/run

Change-Id: I0c74c582bd1d50af1890e4b5a3228e0183eaef2c
---
 system/bta/pan/bta_pan_main.cc | 10 +++++-----
 system/stack/pan/pan_main.cc   |  4 ++++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/system/bta/pan/bta_pan_main.cc b/system/bta/pan/bta_pan_main.cc
index 51d95935950..26941e6ce9f 100644
--- a/system/bta/pan/bta_pan_main.cc
+++ b/system/bta/pan/bta_pan_main.cc
@@ -157,8 +157,8 @@ tBTA_PAN_SCB* bta_pan_scb_alloc(void) {
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event,
-                               tBTA_PAN_DATA* p_data) {
+void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event,
+                        tBTA_PAN_DATA* p_data) {
   tBTA_PAN_ST_TBL state_table;
   uint8_t action;
   int i;
@@ -193,7 +193,7 @@ static void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event,
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_api_enable(tBTA_PAN_DATA* p_data) {
+void bta_pan_api_enable(tBTA_PAN_DATA* p_data) {
   /* initialize control block */
   memset(&bta_pan_cb, 0, sizeof(bta_pan_cb));
 
@@ -212,7 +212,7 @@ static void bta_pan_api_enable(tBTA_PAN_DATA* p_data) {
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_api_disable(UNUSED_ATTR tBTA_PAN_DATA* p_data) {
+void bta_pan_api_disable(UNUSED_ATTR tBTA_PAN_DATA* p_data) {
   bta_pan_disable();
 }
 
@@ -226,7 +226,7 @@ static void bta_pan_api_disable(UNUSED_ATTR tBTA_PAN_DATA* p_data) {
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_api_open(tBTA_PAN_DATA* p_data) {
+void bta_pan_api_open(tBTA_PAN_DATA* p_data) {
   tBTA_PAN_SCB* p_scb;
   tBTA_PAN bta_pan;
 
diff --git a/system/stack/pan/pan_main.cc b/system/stack/pan/pan_main.cc
index e4c1151a106..789e88e943a 100644
--- a/system/stack/pan/pan_main.cc
+++ b/system/stack/pan/pan_main.cc
@@ -23,14 +23,18 @@
  *
  ******************************************************************************/
 
+#include <base/strings/stringprintf.h>
 #include <string.h>  // memset
 
 #include <cstdint>
 
+#include "main/shim/dumpsys.h"
 #include "osi/include/allocator.h"
+#include "osi/include/log.h"
 #include "osi/include/osi.h"  // UNUSED_ATTR
 #include "stack/include/bnep_api.h"
 #include "stack/include/bt_hdr.h"
+#include "stack/include/btm_log_history.h"
 #include "stack/include/sdpdefs.h"
 #include "stack/pan/pan_int.h"
 #include "types/bluetooth/uuid.h"
-- 
GitLab