Log UsbConnectorStateChanged events
The following would the logged:
1. Status of the connection - connected/disconnected.
2. Port id as a device could have multiple ports.
Bug: 118783261
Test: Manually tested by running: adb shell cmd stats print-logs,
adb logcat | grep statsd | grep \(70\)
Change-Id: Ideea36c7745293f5b6ec9cc35fd5f709f5175d5a
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 41a2021..790a6d1 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -1255,14 +1255,15 @@
* Logs when something is plugged into or removed from the USB-C connector.
*
* Logged from:
- * Vendor USB HAL.
+ * UsbService
*/
message UsbConnectorStateChanged {
enum State {
- DISCONNECTED = 0;
- CONNECTED = 1;
+ STATE_DISCONNECTED = 0;
+ STATE_CONNECTED = 1;
}
optional State state = 1;
+ optional string id = 2;
}
/**