Create a bugreport service
Selinux rules disallow apps to access dumpstate service. Further other
rules in platform makes it impossible for us to use platform
bugreporting APIs. Provide a bugreporting service to continue to collect
bugreports in userdebug and eng builds.
Bug: 120571796
Test: Manual
Change-Id: I7472213cd5070f62fdfd80d82f74d9336f0e437f
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 5f98b81..34492fc 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -96,6 +96,7 @@
private final VmsBrokerService mVmsBrokerService;
private final VmsSubscriberService mVmsSubscriberService;
private final VmsPublisherService mVmsPublisherService;
+ private final CarBugreportManagerService mCarBugreportManagerService;
private final CarServiceBase[] mAllServices;
@@ -166,6 +167,7 @@
mUserManagerHelper);
mCarTrustedDeviceService = new CarTrustedDeviceService(serviceContext);
mCarMediaService = new CarMediaService(serviceContext);
+ mCarBugreportManagerService = new CarBugreportManagerService(serviceContext);
CarLocalServices.addService(CarPowerManagementService.class, mCarPowerManagementService);
CarLocalServices.addService(CarUserService.class, mCarUserService);
@@ -201,6 +203,7 @@
allServices.add(mCarTrustedDeviceService);
allServices.add(mCarMediaService);
allServices.add(mCarLocationService);
+ allServices.add(mCarBugreportManagerService);
mAllServices = allServices.toArray(new CarServiceBase[allServices.size()]);
}
@@ -324,6 +327,8 @@
return mCarTrustedDeviceService.getCarTrustAgentEnrollmentService();
case Car.CAR_MEDIA_SERVICE:
return mCarMediaService;
+ case Car.CAR_BUGREPORT_SERVICE:
+ return mCarBugreportManagerService;
default:
Log.w(CarLog.TAG_SERVICE, "getCarService for unknown service:" + serviceName);
return null;