Make VHAL to use the connector/server interfaces instead of talking to
the (faked) vehicle directly. Use passthrough connector for now since we
have not moved to the virtualized scenario yet (but soon :)
Bug: b/141493212
Test: On both Osprey and Hawk. Build and flash the image. If on Osprey, see
go/enable-google-vhal-on-osprey; if on hawk, `aae app vhal apply google`
to enable Google VHAL
```
# no VHAL crash
$ adb logcat
$ vts-tradefed
> run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host
# 30 passed, 2 failed, the same as the result before this patch
# See value changed in Vehicle HAL tab, KitchenSink app:
$ python packages/services/Car/tools/emulator/prop_event_simulator.py --property
VEHICLEPROPERTY_HVAC_AC_ON --area 0 --value 1
# unit tests
$ atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java
```
Change-Id: Iab77a0ae32db2c55b4c65aa8f3e4f73ec9ef2644
Also rename DefaultVehicleHal to EmulatedVehicleHal and
extract emulator related code to VehicleEmulator class
Test: mm -j32 ; verified Car Service worked
Change-Id: I34361fdec6f94629cf7ef6c35ff56ef9ce78b855
the getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: I1fc92a29178befc1b2232cfcc4b13058d57cd798
Major changes / decisions:
- created empty IVehicle@2.1 interface to distinguish HAL impls
from client's (Car Service) perspective;
- created default 2.1 implementation that currently delegates all
calls to existing 2.0 implementation
- had to refactor a little bit 2.0 thus components could be esily
imported in 2.1
TOOD:
- move OBD and VMS code to 2.1
- decouple "DefaultVehicleHal.cpp"
- rename "DefaultVehicleHal" to Emulator (let's call things by their names)
b/34716856
Test: todo
Change-Id: Ib23650ca1277f0dfb24e5c789d65a19dce8b1abc