1 /******************************************************************************
2  *
3  *  Copyright 2021 Google, Inc.
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 #include "os/metrics.h"
20 #include "os/log.h"
21 
22 namespace bluetooth {
23 namespace os {
24 
25 using bluetooth::hci::Address;
26 
LogMetricClassicPairingEvent(const Address &,uint16_t,uint32_t,uint16_t,uint16_t,uint16_t,int64_t)27 void LogMetricClassicPairingEvent(
28     const Address& /* address */,
29     uint16_t /* handle */,
30     uint32_t /* hci_cmd */,
31     uint16_t /* hci_event */,
32     uint16_t /* cmd_status */,
33     uint16_t /* reason_code */,
34     int64_t /* event_value */) {}
35 
LogMetricSocketConnectionState(const Address &,int,int,android::bluetooth::SocketConnectionstateEnum,int64_t,int64_t,int,int,android::bluetooth::SocketRoleEnum)36 void LogMetricSocketConnectionState(
37     const Address& /* address */,
38     int /* port */,
39     int /* type */,
40     android::bluetooth::SocketConnectionstateEnum /* connection_state */,
41     int64_t /* tx_bytes */,
42     int64_t /* rx_bytes */,
43     int /* uid */,
44     int /* server_port */,
45     android::bluetooth::SocketRoleEnum /* socket_role */) {}
46 
LogMetricHciTimeoutEvent(uint32_t)47 void LogMetricHciTimeoutEvent(uint32_t /* hci_cmd */) {}
48 
LogMetricA2dpAudioUnderrunEvent(const Address &,uint64_t,int)49 void LogMetricA2dpAudioUnderrunEvent(
50     const Address& /* address */,
51     uint64_t /* encoding_interval_millis */,
52     int /* num_missing_pcm_bytes */) {}
53 
LogMetricA2dpAudioOverrunEvent(const Address &,uint64_t,int,int,int)54 void LogMetricA2dpAudioOverrunEvent(
55     const Address& /* address */,
56     uint64_t /* encoding_interval_millis */,
57     int /* num_dropped_buffers */,
58     int /* num_dropped_encoded_frames */,
59     int /* num_dropped_encoded_bytes */) {}
60 
LogMetricHfpPacketLossStats(const Address &,int,double,uint16_t)61 void LogMetricHfpPacketLossStats(
62     const Address& /* address */,
63     int /* num_decoded_frames */,
64     double /* packet_loss_ratio */,
65     uint16_t /* codec_type */) {}
66 
LogMetricMmcTranscodeRttStats(int,double,int,int)67 void LogMetricMmcTranscodeRttStats(
68     int /* maximum_rtt */, double /* mean_rtt */, int /* num_requests */, int /* codec_type */) {}
69 
LogMetricReadRssiResult(const Address &,uint16_t,uint32_t,int8_t)70 void LogMetricReadRssiResult(
71     const Address& /* address */,
72     uint16_t /* handle */,
73     uint32_t /* cmd_status */,
74     int8_t /* rssi */) {}
75 
LogMetricReadFailedContactCounterResult(const Address &,uint16_t,uint32_t,int32_t)76 void LogMetricReadFailedContactCounterResult(
77     const Address& /* address */,
78     uint16_t /* handle */,
79     uint32_t /* cmd_status */,
80     int32_t /* failed_contact_counter */) {}
81 
LogMetricReadTxPowerLevelResult(const Address &,uint16_t,uint32_t,int32_t)82 void LogMetricReadTxPowerLevelResult(
83     const Address& /* address */,
84     uint16_t /* handle */,
85     uint32_t /* cmd_status */,
86     int32_t /* transmit_power_level */) {}
87 
LogMetricRemoteVersionInfo(uint16_t,uint8_t,uint8_t,uint16_t,uint16_t)88 void LogMetricRemoteVersionInfo(
89     uint16_t /* handle */,
90     uint8_t /* status */,
91     uint8_t /* version */,
92     uint16_t /* manufacturer_name */,
93     uint16_t /* subversion */) {}
94 
LogMetricLinkLayerConnectionEvent(const Address *,uint32_t,android::bluetooth::DirectionEnum,uint16_t,uint32_t,uint16_t,uint16_t,uint16_t,uint16_t)95 void LogMetricLinkLayerConnectionEvent(
96     const Address* /* address */,
97     uint32_t /* connection_handle */,
98     android::bluetooth::DirectionEnum /* direction */,
99     uint16_t /* link_type */,
100     uint32_t /* hci_cmd */,
101     uint16_t /* hci_event */,
102     uint16_t /* hci_ble_event */,
103     uint16_t /* cmd_status */,
104     uint16_t /* reason_code */) {}
105 
LogMetricManufacturerInfo(const Address &,android::bluetooth::AddressTypeEnum,android::bluetooth::DeviceInfoSrcEnum,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &)106 void LogMetricManufacturerInfo(
107     const Address& /* address */,
108     android::bluetooth::AddressTypeEnum /* address_type */,
109     android::bluetooth::DeviceInfoSrcEnum /* source_type */,
110     const std::string& /* source_name */,
111     const std::string& /* manufacturer */,
112     const std::string& /* model */,
113     const std::string& /* hardware_version */,
114     const std::string& /* software_version */) {}
115 
LogMetricSdpAttribute(const Address &,uint16_t,uint16_t,size_t,const char *)116 void LogMetricSdpAttribute(
117     const Address& /* address */,
118     uint16_t /* protocol_uuid */,
119     uint16_t /* attribute_id */,
120     size_t /* attribute_size */,
121     const char* /* attribute_value */) {}
122 
LogMetricSmpPairingEvent(const Address &,uint16_t,android::bluetooth::DirectionEnum,uint16_t)123 void LogMetricSmpPairingEvent(
124     const Address& /* address */,
125     uint16_t /* smp_cmd */,
126     android::bluetooth::DirectionEnum /* direction */,
127     uint16_t /* smp_fail_reason */) {}
128 
LogMetricA2dpPlaybackEvent(const Address &,int,int)129 void LogMetricA2dpPlaybackEvent(
130     const Address& /* address */, int /* playback_state */, int /* audio_coding_mode */) {}
131 
LogMetricA2dpSessionMetricsEvent(const Address &,int64_t,int,int,int,int,int,int,float,int,int64_t,bool)132 void LogMetricA2dpSessionMetricsEvent(
133     const Address& /* address */,
134     int64_t /* audio_duration_ms */,
135     int /* media_timer_min_ms */,
136     int /* media_timer_max_ms */,
137     int /* media_timer_avg_ms */,
138     int /* total_scheduling_count */,
139     int /* buffer_overruns_max_count */,
140     int /* buffer_overruns_total */,
141     float /* buffer_underruns_average */,
142     int /* buffer_underruns_count */,
143     int64_t /* codec_index */,
144     bool /* is_a2dp_offload */) {}
145 
LogMetricBluetoothHalCrashReason(const Address &,uint32_t,uint32_t)146 void LogMetricBluetoothHalCrashReason(
147     const Address& /* address */, uint32_t /* error_code */, uint32_t /* vendor_error_code */) {}
148 
LogMetricBluetoothLocalSupportedFeatures(uint32_t,uint64_t)149 void LogMetricBluetoothLocalSupportedFeatures(uint32_t /* page_num */, uint64_t /* features */) {}
150 
LogMetricBluetoothLocalVersions(uint32_t,uint8_t,uint32_t,uint8_t,uint32_t)151 void LogMetricBluetoothLocalVersions(
152     uint32_t /* lmp_manufacturer_name */,
153     uint8_t /* lmp_version */,
154     uint32_t /* lmp_subversion */,
155     uint8_t /* hci_version */,
156     uint32_t /* hci_reversion */) {}
157 
LogMetricBluetoothDisconnectionReasonReported(uint32_t,const Address &,uint32_t)158 void LogMetricBluetoothDisconnectionReasonReported(
159     uint32_t /* reason */, const Address& /* address */, uint32_t /* connection_handle */) {}
160 
LogMetricBluetoothRemoteSupportedFeatures(const Address &,uint32_t,uint64_t,uint32_t)161 void LogMetricBluetoothRemoteSupportedFeatures(
162     const Address& /* address */,
163     uint32_t /* page */,
164     uint64_t /* features */,
165     uint32_t /* connection_handle */) {}
166 
LogMetricBluetoothCodePathCounterMetrics(int32_t,int64_t)167 void LogMetricBluetoothCodePathCounterMetrics(int32_t /* key */, int64_t /* count */) {}
168 
LogMetricBluetoothLEConnectionMetricEvent(const Address &,android::bluetooth::le::LeConnectionOriginType,android::bluetooth::le::LeConnectionType,android::bluetooth::le::LeConnectionState,std::vector<std::pair<os::ArgumentType,int>> &)169 void LogMetricBluetoothLEConnectionMetricEvent(
170     const Address& /* address */,
171     android::bluetooth::le::LeConnectionOriginType /* origin_type */,
172     android::bluetooth::le::LeConnectionType /* connection_type */,
173     android::bluetooth::le::LeConnectionState /* transaction_state */,
174     std::vector<std::pair<os::ArgumentType, int>>& /* argument_list */) {}
175 
LogMetricBluetoothLEConnection(os::LEConnectionSessionOptions)176 void LogMetricBluetoothLEConnection(os::LEConnectionSessionOptions /* session_options */) {}
177 
178 }  // namespace os
179 }  // namespace bluetooth
180