Update the CarLocationService to work when the system user is headless.
Bug: b/79772231
Test: Tested on Owl and ran atest CarLocationServiceTest
Change-Id: I1598f0fba0ba5335cb1d9c81e16d1db8d7922df0
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 9a15631..67c50a7 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -123,8 +123,6 @@
mCarInputService = new CarInputService(serviceContext, mHal.getInputHal());
mCarProjectionService = new CarProjectionService(serviceContext, mCarInputService);
mGarageModeService = new GarageModeService(mContext, mCarPowerManagementService);
- mCarLocationService = new CarLocationService(mContext, mCarPowerManagementService,
- mCarPropertyService);
mAppFocusService = new AppFocusService(serviceContext, mSystemActivityMonitoringService);
mCarAudioService = new CarAudioService(serviceContext);
mCarNightService = new CarNightService(serviceContext, mCarPropertyService);
@@ -143,6 +141,8 @@
mCarConfigurationService =
new CarConfigurationService(serviceContext, new JsonReaderImpl());
mUserManagerHelper = new CarUserManagerHelper(serviceContext);
+ mCarLocationService = new CarLocationService(mContext, mCarPowerManagementService,
+ mCarPropertyService, mUserManagerHelper);
// Be careful with order. Service depending on other service should be inited later.
List<CarServiceBase> allServices = new ArrayList<>();
@@ -153,7 +153,6 @@
allServices.add(mCarUXRestrictionsService);
allServices.add(mCarPackageManagerService);
allServices.add(mCarInputService);
- allServices.add(mCarLocationService);
allServices.add(mGarageModeService);
allServices.add(mAppFocusService);
allServices.add(mCarAudioService);
@@ -174,6 +173,7 @@
allServices.add(mCarUserService);
}
+ allServices.add(mCarLocationService);
mAllServices = allServices.toArray(new CarServiceBase[allServices.size()]);
}