Dump VMS HAL client stats obtained by reading a vendor property.
Bug: 139153868
Test: Added new unit tests to VmsHalServiceTest
Test: atest AndroidCarApiTest CarServiceTest CarServiceUnitTest
Change-Id: I97fcd730c7433ea6753719207d967e119bcc6a4f
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 5c170d9..8527208 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -118,7 +118,7 @@
CanBusErrorNotifier errorNotifier, String vehicleInterfaceName) {
mContext = serviceContext;
mSystemInterface = systemInterface;
- mHal = new VehicleHal(vehicle);
+ mHal = new VehicleHal(serviceContext, vehicle);
mVehicleInterfaceName = vehicleInterfaceName;
mUserManagerHelper = new CarUserManagerHelper(serviceContext);
final Resources res = mContext.getResources();
@@ -473,6 +473,8 @@
} else if ("--metrics".equals(args[0])) {
writer.println("*Dump car service metrics*");
dumpAllServices(writer, true);
+ } else if ("--vms-hal".equals(args[0])) {
+ mHal.getVmsHal().dumpMetrics(fd);
} else if (Build.IS_USERDEBUG || Build.IS_ENG) {
execShellCmd(args, writer);
} else {