Make CarPackageManager listen to UX restrictions.
CarPackageManager used to subscribe to CarSensorManager's DRIVING_STATUS
to enforce activity blocking. Changing that to listen to the new
CarUxRestrictionsManagerService.
Add the Home App to the white list.
No change to the current restriction behavior yet, only changing the
source to the new Restriction Manager.
Bug: b/72570830
Test: Compile and boot. CarPackageManager can receive Ux Restriction
events.
Change-Id: I3b96a004cafa2813b7d1855e68cea53c9ffb5f40
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index f93ea7f..cd2f47d 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -109,7 +109,8 @@
mCarDrivingStateService = new CarDrivingStateService(serviceContext, mCarSensorService);
mCarUXRestrictionsService = new CarUxRestrictionsManagerService(serviceContext,
mCarDrivingStateService);
- mCarPackageManagerService = new CarPackageManagerService(serviceContext, mCarSensorService,
+ mCarPackageManagerService = new CarPackageManagerService(serviceContext,
+ mCarUXRestrictionsService,
mSystemActivityMonitoringService);
mCarInputService = new CarInputService(serviceContext, mHal.getInputHal());
mCarProjectionService = new CarProjectionService(serviceContext, mCarInputService);