Add Car service support for Trusted device.
Support added for:
1. Implementing the APIs for CarTrustAgentEnrollmentManager.
2. A BLE Trust Agent for car that the system binds to.
3. A BLE Service that sets up GATT service and characteristics for
enrollment and unlock.
Bug: 120911995
Test: Test Trusted device enrollment and unlock works.
Change-Id: I563cddded0dedd16593d38c65d84ab8ae8de6dc3
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 2df562e..fbdb5cb 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -42,7 +42,7 @@
import com.android.car.internal.FeatureConfiguration;
import com.android.car.pm.CarPackageManagerService;
import com.android.car.systeminterface.SystemInterface;
-import com.android.car.trust.CarTrustAgentEnrollmentService;
+import com.android.car.trust.CarTrustedDeviceService;
import com.android.car.user.CarUserService;
import com.android.car.vms.VmsBrokerService;
import com.android.car.vms.VmsClientManager;
@@ -86,7 +86,7 @@
private final CarDiagnosticService mCarDiagnosticService;
private final CarStorageMonitoringService mCarStorageMonitoringService;
private final CarConfigurationService mCarConfigurationService;
- private final CarTrustAgentEnrollmentService mCarTrustAgentEnrollmentService;
+ private final CarTrustedDeviceService mCarTrustedDeviceService;
private final CarMediaService mCarMediaService;
private final CarUserManagerHelper mUserManagerHelper;
private final CarUserService mCarUserService;
@@ -156,10 +156,13 @@
new CarConfigurationService(serviceContext, new JsonReaderImpl());
mCarLocationService = new CarLocationService(mContext, mCarPropertyService,
mUserManagerHelper);
- mCarTrustAgentEnrollmentService = new CarTrustAgentEnrollmentService(serviceContext);
+ mCarTrustedDeviceService = new CarTrustedDeviceService(serviceContext);
mCarMediaService = new CarMediaService(serviceContext);
CarLocalServices.addService(CarUserService.class, mCarUserService);
+ Log.d(TAG, "Adding CarTrustedDeviceService");
+ CarLocalServices.addService(CarTrustedDeviceService.class,
+ mCarTrustedDeviceService);
CarLocalServices.addService(SystemInterface.class, mSystemInterface);
// Be careful with order. Service depending on other service should be inited later.
@@ -187,7 +190,7 @@
allServices.add(mVmsClientManager);
allServices.add(mVmsSubscriberService);
allServices.add(mVmsPublisherService);
- allServices.add(mCarTrustAgentEnrollmentService);
+ allServices.add(mCarTrustedDeviceService);
allServices.add(mCarMediaService);
allServices.add(mCarLocationService);
mAllServices = allServices.toArray(new CarServiceBase[allServices.size()]);
@@ -301,7 +304,7 @@
return mCarConfigurationService;
case Car.CAR_TRUST_AGENT_ENROLLMENT_SERVICE:
assertTrustAgentEnrollmentPermission(mContext);
- return mCarTrustAgentEnrollmentService;
+ return mCarTrustedDeviceService.getCarTrustAgentEnrollmentService();
case Car.CAR_MEDIA_SERVICE:
return mCarMediaService;
default: