Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9c1ea57 authored by Aritra Sen's avatar Aritra Sen
Browse files

Move logging code for btif_sock in a different module and aggregate dumpsys...

Move logging code for btif_sock in a different module and aggregate dumpsys and metric logic in one place.

Bug: 295023364
Test: m -j $(nproc)
Flag: EXEMPT ; these are logging changes (Metrics/dumpsys)
Change-Id: I96b2773e34211a19b30b0261329867ce95a7c2dc
parent 741a2c11
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ cc_library_static {
        "src/btif_sdp_server.cc",
        "src/btif_sock.cc",
        "src/btif_sock_l2cap.cc",
        "src/btif_sock_logging.cc",
        "src/btif_sock_rfc.cc",
        "src/btif_sock_sco.cc",
        "src/btif_sock_sdp.cc",
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ static_library("btif") {
    "src/btif_sdp_server.cc",
    "src/btif_sock.cc",
    "src/btif_sock_l2cap.cc",
    "src/btif_sock_logging.cc",
    "src/btif_sock_rfc.cc",
    "src/btif_sock_sco.cc",
    "src/btif_sock_sdp.cc",
+0 −4
Original line number Diff line number Diff line
@@ -47,7 +47,3 @@ const btsock_interface_t* btif_sock_get_interface(void);

bt_status_t btif_sock_init(uid_set_t* uid_set);
void btif_sock_cleanup(void);

void btif_sock_connection_logger(int state, int role, const RawAddress& addr,
                                 int channel, const char* server_name);
void btif_sock_dump(int fd);
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include "types/raw_address.h"

void btif_sock_connection_logger(const RawAddress& address, int port, int type,
                                 int state, int role, int uid, int server_port,
                                 int64_t tx_bytes, int64_t rx_bytes,
                                 const char* server_name);
void btif_sock_dump(int fd);
+2 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@
#include "bta/include/bta_vc_api.h"
#include "btif/avrcp/avrcp_service.h"
#include "btif/include/btif_sock.h"
#include "btif/include/btif_sock_logging.h"
#include "btif/include/core_callbacks.h"
#include "btif/include/stack_manager_t.h"
#include "btif_a2dp.h"
@@ -82,6 +83,7 @@
#include "btif_profile_storage.h"
#include "btif_rc.h"
#include "btif_sock.h"
#include "btif_sock_logging.h"
#include "btif_storage.h"
#include "common/address_obfuscator.h"
#include "common/init_flags.h"
Loading