add audio mute after display off

- Add SystemStateControllerService to control
  system behavior during power state transition.
- For now, only mute audio when display is turned off.
- Audio muting is currently done by focus but should
  be done via mute state in audio focus vehicle hal later.
- also fixed powerOn notification bug: send it whenever
  there is display state change. also fixed wrong display
  state check before sending it.

bug: 28018362
Change-Id: I786cadbb59e89ff880e24d37245c904db1904dd6
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 43061db..af5e0f4 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -61,6 +61,7 @@
     private final GarageModeService mGarageModeService;
     private final CarNavigationService mCarNavigationService;
     private final InstrumentClusterService mInstrumentClusterService;
+    private final SystemStateControllerService mSystemStateControllerService;
 
     /** Test only service. Populate it only when necessary. */
     @GuardedBy("this")
@@ -102,6 +103,8 @@
         mInstrumentClusterService = new InstrumentClusterService(serviceContext);
         mCarNavigationService = new CarNavigationService(
                 serviceContext, mAppContextService, mInstrumentClusterService);
+        mSystemStateControllerService = new SystemStateControllerService(serviceContext,
+                mCarPowerManagementService);
 
         // Be careful with order. Service depending on other service should be inited later.
         mAllServices = new CarServiceBase[] {
@@ -120,6 +123,7 @@
                 mInstrumentClusterService,
                 mCarProjectionService,
                 mCarNavigationService,
+                mSystemStateControllerService
                 };
     }