Lazy initialization of CarStorageMonitoringService
- Introduce an API in SystemInterface by which one can register actions that
will be executed "after some (partially configurable)" delay after the
ACTION_BOOT_COMPLETED broadcast is received.
- Move most of the initialization of CarStorageMonitoringService as one such action.
- Introduce a way to send a fake ACTION_BOOT_COMPLETED notification for testing.
Bug: 32512551
Test: manual verification that the service properly comes up and responds to queries after a delay +
runtest -x packages/services/Car/tests/carservice_test/src/com/android/car/CarStorageMonitoringTest.java
runtest -x packages/services/Car/tests/carservice_unit_test/src/com/android/car/CarPowerManagementServiceTest.java
Change-Id: I31eb24df2ae66fa0bc88865f469e04d57e0a127f
6 files changed