Bluetooth: Log class of device
* Add BluetoothClassOfDeviceReported atom to log class of device
during connection and pairing
Bug: 112969790
Test: make, test drive with statsd
Change-Id: I8039f3f94f8bc4aa9ef2b67d04929421805d2432
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index cadc3a0..dc4413f 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -259,6 +259,7 @@
BiometricEnrolled biometric_enrolled = 184;
SystemServerWatchdogOccurred system_server_watchdog_occurred = 185;
TombStoneOccurred tomb_stone_occurred = 186;
+ BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187;
}
// Pulled events will start at field 10000.
@@ -2142,6 +2143,29 @@
}
/**
+ * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection
+ *
+ * Logged from:
+ * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java
+ * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java
+ *
+ */
+message BluetoothClassOfDeviceReported {
+ // An identifier that can be used to match events for this device.
+ // Currently, this is a salted hash of the MAC address of this Bluetooth device.
+ // Salt: Randomly generated 256 bit value
+ // Hash algorithm: HMAC-SHA256
+ // Size: 32 byte
+ // Default: null or empty if this is a server listener socket
+ optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
+ // Class of Device (CoD) value including both Major, Minor device class and service class
+ // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband
+ // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass
+ // Default: 0
+ optional int32 class_of_device = 2;
+}
+
+/**
* Logs when something is plugged into or removed from the USB-C connector.
*
* Logged from: