diff --git a/app/src/google/java/net/vonforst/evmap/auto/CarAppService.kt b/app/src/google/java/net/vonforst/evmap/auto/CarAppService.kt index 44ecc04b..d51d7632 100644 --- a/app/src/google/java/net/vonforst/evmap/auto/CarAppService.kt +++ b/app/src/google/java/net/vonforst/evmap/auto/CarAppService.kt @@ -49,8 +49,9 @@ class EVMapSession(val cas: CarAppService) : Session(), LifecycleObserver { } private var location: Location? = null private var locationService: CarLocationService? = null - private val hardwareMan = + private val hardwareMan: CarHardwareManager by lazy { carContext.getCarService(CarContext.HARDWARE_SERVICE) as CarHardwareManager + } private val serviceConnection = object : ServiceConnection { override fun onServiceConnected(name: ComponentName, ibinder: IBinder) {