Refactor Instrument Cluster API
- separate Car Service and Inst Cluster Renderer proccesses
- remove DemoInstrumentClusterRendering (we probably will make reference
Renderer based on work we did for I/O)
- deprecate instrument cluster listeners in CarNavigationManager
Change-Id: Id24142b5811b22477177b2bbcb4cc0e463023b18
Bug:28719314
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index 315b24e..d2329ba 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -18,12 +18,12 @@
import android.car.Car;
import android.car.ICar;
+import android.car.cluster.renderer.IInstrumentClusterNavigation;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.util.Log;
-import com.android.car.cluster.CarNavigationService;
import com.android.car.cluster.InstrumentClusterService;
import com.android.car.hal.VehicleHal;
import com.android.car.pm.CarPackageManagerService;
@@ -59,7 +59,6 @@
private final CarNightService mCarNightService;
private final AppFocusService mAppFocusService;
private final GarageModeService mGarageModeService;
- private final CarNavigationService mCarNavigationService;
private final InstrumentClusterService mInstrumentClusterService;
private final SystemStateControllerService mSystemStateControllerService;
@@ -100,9 +99,8 @@
mCarCameraService = new CarCameraService(serviceContext);
mCarNightService = new CarNightService(serviceContext);
mCarPackageManagerService = new CarPackageManagerService(serviceContext);
- mInstrumentClusterService = new InstrumentClusterService(serviceContext);
- mCarNavigationService = new CarNavigationService(
- mAppFocusService, mInstrumentClusterService);
+ mInstrumentClusterService = new InstrumentClusterService(serviceContext,
+ mAppFocusService);
mSystemStateControllerService = new SystemStateControllerService(serviceContext,
mCarPowerManagementService, mCarAudioService, this);
@@ -122,7 +120,6 @@
mCarNightService,
mInstrumentClusterService,
mCarProjectionService,
- mCarNavigationService,
mSystemStateControllerService
};
}
@@ -187,7 +184,9 @@
return mCarRadioService;
case Car.CAR_NAVIGATION_SERVICE:
assertNavigationManagerPermission(mContext);
- return mCarNavigationService;
+ IInstrumentClusterNavigation navService =
+ mInstrumentClusterService.getNavigationService();
+ return navService == null ? null : navService.asBinder();
case Car.PROJECTION_SERVICE:
assertProjectionPermission(mContext);
return mCarProjectionService;