Making VMS a @SystemAPI
This CL should go in the Pi/Master and O.Car.MR1 branches.
Test: I built an image w/o @FutureFeature enabled and verified all the tests pass. Also fixed a test flakiness.
Change-Id: I50495d6264c7932b670a4fae456d7f89ab5c1e55
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index bd42454..d4acdb3 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -121,10 +121,8 @@
mPerUserCarServiceHelper = new PerUserCarServiceHelper(serviceContext);
mCarBluetoothService = new CarBluetoothService(serviceContext, mCarCabinService,
mCarSensorService, mPerUserCarServiceHelper);
- if (FeatureConfiguration.ENABLE_VEHICLE_MAP_SERVICE) {
- mVmsSubscriberService = new VmsSubscriberService(serviceContext, mHal.getVmsHal());
- mVmsPublisherService = new VmsPublisherService(serviceContext, mHal.getVmsHal());
- }
+ mVmsSubscriberService = new VmsSubscriberService(serviceContext, mHal.getVmsHal());
+ mVmsPublisherService = new VmsPublisherService(serviceContext, mHal.getVmsHal());
mCarDiagnosticService = new CarDiagnosticService(serviceContext, mHal.getDiagnosticHal());
// Be careful with order. Service depending on other service should be inited later.
@@ -148,12 +146,10 @@
mCarVendorExtensionService,
mCarBluetoothService,
mCarDiagnosticService,
- mPerUserCarServiceHelper
+ mPerUserCarServiceHelper,
+ mVmsSubscriberService,
+ mVmsPublisherService
));
- if (FeatureConfiguration.ENABLE_VEHICLE_MAP_SERVICE) {
- allServices.add(mVmsSubscriberService);
- allServices.add(mVmsPublisherService);
- }
mAllServices = allServices.toArray(new CarServiceBase[0]);
}
@@ -234,11 +230,8 @@
assertVendorExtensionPermission(mContext);
return mCarVendorExtensionService;
case Car.VMS_SUBSCRIBER_SERVICE:
- FeatureUtil.assertFeature(FeatureConfiguration.ENABLE_VEHICLE_MAP_SERVICE);
- if (FeatureConfiguration.ENABLE_VEHICLE_MAP_SERVICE) {
- assertVmsSubscriberPermission(mContext);
- return mVmsSubscriberService;
- }
+ assertVmsSubscriberPermission(mContext);
+ return mVmsSubscriberService;
case Car.TEST_SERVICE: {
assertPermission(mContext, Car.PERMISSION_CAR_TEST_SERVICE);
synchronized (this) {