Bug: 110105682
Test: build, deploy, test updating temp via app UI, temp change reflected in subscribed system UI
Change-Id: I75e6825ff9450f977c1f5d7f2b97bca6c78f1883
(cherry picked from commit 6d8110ffbf7e964246c13810d909b3a5cf7818b6)
Previously, when running under the emulator, it would only connect to
the emulator's qemu pipe and you couldn't script the emulated VHAL.
Also changed the logic of SocketComm so that it supports connections
from more than one client at a time.
Bug: 87643732
Test: tested locally
Change-Id: I504cd806f0a95799a68b75c3515c1f230109f1d0
(cherry picked from commit 8dad67a0148114cb60f3567268bc2cf40ff18f82)
Cleanup defaultconfig.h to have proper initial values so that all
properties may be tested with EmbeddedKitchenSink.
Bug: 109674339
Test: Embedded Kitchen Sink
Change-Id: I3007c645b90b0e6805b8d1011c3a8d659eb13d2b
All but this enum follow the naming pattern. Now Wheels do too.
Test: Build Mojave and Owl
Bug: 79995183
Change-Id: Ifa9efd50aaae13ac7f437c5efe8cf70aa64218e9
ConfigArray replaces the need for configFlags. Deprecate this before it
gets released.
Bug: 74133619
Test: grep -ril configflag shows all instances removed
Change-Id: I645862507959738eb2739e70a53827b749e88aeb
(1) Specify rules for property to area mapping
(2) Fix comment for WHEEL_TICK property
(3) Document the need for supported gears from vhal. CURRENT_GEAR and GEAR_SELECTION should report the list of available gears in the vehicle. This helps in determining the driving state of the vehicle.
Merge changes from ag/4051112 ag/4026897
Bug: 79434788
Bug: 77849652
Bug: 79260189
Test: Build and Flash
Change-Id: Ib2bd488a5ec09fe3bdf8807c253aebcdb240324b
Note: It only supports a single generation task at any time. Mixed value
properties like diagnostics frame is not implemented yet. It only
supports properties with ON_CHANGE mode for now.
Bug: 76017041
Test: lunch bat_land-userdebug & m -j8; adb push <json_data>
/data/local/tmp; use python emulator to inject fake value "start" command
specifying the JSON data path on device; verify values on KitchenSink app
Change-Id: Ic964ef52a19422bab7015fe54c7e4c5ef8b47a55
This property was an inadvertent duplicate of HVAC_TEMPERATURE_CURRENT.
Test: Build OWL and Mojave
Bug: 78599196
Change-Id: I698217de0fa91ed817ec95a375a0949160ae8be5
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.
Bug: 68112778
Test: mma
Change-Id: I22b76f3d5bcd084afd2f06e613d2f9f37c1a0c9c
Window position and motion updated.
Also added comments calling out explicit temperature units.
Test: Build mojave
Change-Id: If283a5f0de1ff6e9b2d3c21bcd652de55e2d7046
Bug: 77983671
DRIVING_STATUS is not required from VHAL. It will be derived from other
car sensor vehicle properties in higher layers.
Bug: 71793754
Test: compile and boot.
Change-Id: Ia9f9aeb0e7ff0f16c66422ecb4dc9ad9c152a844
This is needed for e2e testing, specifically to emulate steering-wheel
buttons from KitchenSink app
Bug: 74616964
Test: manual through kitchensink app
Change-Id: I08de2404f9e17af6b08c2cb1f0fbdc45c655a405
The status field of a property represents properties of the underlying implementation and it should thus
be read-only to Android. Add a way for VehiclePropertyStore to be told whether it does (or does not) need to
propagate the field to the stored property value.
Test: build
Bug: 76034442
Change-Id: I333fab7e296f425cf5c4a35ae136ccfbaa542379
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.
Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
Properties being (UN)AVAILABLE is used as a one-way communication mechanism from the hardware
to the operating system, and not viceversa.
Add safety checks in our default HAL implementation to:
- prevent Android from marking a property as UNAVAILABLE;
- prevent Android from writing to an UNAVAILABLE property.
The combined effect of these two check is that only AVAILABLE properties are writable,
and they can never be flipped to UNAVAILABLE outside of the HAL implementation itself.
Bug: 74805437
Test: manual
Change-Id: Ib830427d604579015fa142f0fa76f8b73a68a452
Refactor handling of property specific code in emulator. The
AP_POWER_STATE property is different from other properties in the system
because it has different values for get/set. Thus, it needs to be
special cased by the default emulator.
Bug: 32061842
Test: VHAL emulator
Change-Id: Ic325ef401abbcf09a7808a9eca01cbfe8b3cc94f
We are changing VehicleHvacFanDirection to be a bit mask so that any
combination of fan directions can be made. This means that
HVAC_FAN_DIRECTION_AVAILABLE must now be a int32_vector.
Bug: 72221544
Test: Unit tests pass
Change-Id: I602871c95aa2429ea334ec85a879610c68979184
VMS latest functionality which was added as part of the API review.
Change-Id: I8866d659e0df750eb86f1f3916aababf37e40649
Test: pending on later ref hal impl similar to other enums.
This CL contains the following modifications:
- Add INT64_VEC type
- Rename VehiclePropertyType:COMPLEX to MIXED
- Remove supportedAreas from VehiclePropConfig
- Allow an areaId to contain multiple zones/seats/windows
- Remove ROW_* zones
- Remove zone/areaId from subscribe() interface
- CLANG formatting
Bug: 72348165
Test: Compiles
Change-Id: I274dc69b6532a06433a0409c7ca44d0a5bce65af
See go/aae-audio for an implementation guide for automotive that does
not rely upon these car specific properties. The very small remaining
automotive specific elements will be represented in the automotive audio
control HAL.
Change-Id: Ia2147a8e486bdb896097771970f0527fc630b9c4
Test: not yet. Will run vhal VTS tests.
Having this property available allows one to simulate key events via Vhal Emulator for testing/debugging purposes
Test: manual
Exempt-From-Owner-Approval: CL against code owned by Automotive team
Change-Id: I1de84c616c6611b8562f9c4442195829869f224d
(cherry picked from commit cbc10191c3d56490a646a472635e8babc397cb44)
Test: read file
Change-Id: I32db85f45ebe38c128415f0fa3cb7ccca66d4a97
Exempt-From-Owner-Approval: smoreland@ suggested we take ownership of this subdirectory
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.
Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
There is a separate step that initializes them with meaningful values.
Change-Id: I2480a029773b62b0e77b8c52c73f2ee465caf17c
Fixes: b/65125128
Test: runtest -x packages/services/Car/tests/android_car_api_test/src/android/car/apitest/CarDiagnosticManagerTest.java
Mostly comment updates for clarification.
Updates the names of a few constants (but not their value nor usage).
Test: build for Mojave
Change-Id: Ic9021f82fa4bd960189e005f074f2b407be13ae7
bug: 65384336
Vehicle HAL is property based and all properties are considered
optional. It is quite a bit of pain to create new versions of VHAL only
to extend properties.
Bug: 64303350
Test: build and flash, verefied system works stable.
Change-Id: I8adb858f53a5d9d31f7444bf97ae09baf2fffafa
Update the Android.bp generated with hidl-gen.
Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
Allow HAL definition libs to be static.
Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
Fix typos and clarify a couple of sentences in the descriptive comments
associated with Vehicle HAL (especially with respect to AUDIO).
Test: make -j40
Change-Id: If3bcb82a68d28c5560398174e5201227c15596d4
These methods are already generated by HIDL, but this is
only now being realized.
Test: methods no longer conflict
Merged-In: I522630267beb7f87713a0a54c1ecb38077dc1b4e
Change-Id: I522630267beb7f87713a0a54c1ecb38077dc1b4e
These methods are already generated by HIDL, but this is
only now being realized.
Test: methods no longer conflict
Change-Id: I522630267beb7f87713a0a54c1ecb38077dc1b4e
One of the triggers for Bluetooth Auto connect is a door unlock signal.
Adding it to the list of default supported properties.
Bug: b/37674555
Test: Auto connect triggers on adb shell dumpsys activity service
com.android.car inject-event zoned-boolean 0x16200b02 1 false
Change-Id: Icfed9ea57239cd2397f3e71dcfaccd767a2e9739
(cherry picked from commit e17a009d5d)
One of the triggers for Bluetooth Auto connect is a door unlock signal.
Adding it to the list of default supported properties.
Bug: b/37674555
Test: Auto connect triggers on adb shell dumpsys activity service
com.android.car inject-event zoned-boolean 0x16200b02 1 false
Change-Id: Icfed9ea57239cd2397f3e71dcfaccd767a2e9739
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Missing dependency that was being transitively included
from MQDescriptor.h.
Test: links
Bug: 37791060
Change-Id: I90ccb2edabab8c63429caa0884f6c5820c29fe11
(cherry picked from commit 356c2ced1d)
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Missing dependency that was being transitively included
from MQDescriptor.h.
Test: links
Bug: 37791060
Change-Id: I90ccb2edabab8c63429caa0884f6c5820c29fe11
Sending a null hidl_string from native code to Java is currently not
a supported operation and will cause a crash. As originally written,
shallowCopy would set a hidl_string to null as soon as a non-empty
stringValue was followed by an empty stringValue. Since freeze frames
come with a string value (the DTC) and live frames doesn't, this would
cause all diagnostics to crash while reading VehiclePropValue from parcel
immediately after dispatching a freeze frame. Fix by resetting empty strings
to a global non-null but zero length buffer.
Bug: 37435530
Test: diagnostic_injector.py
Change-Id: Ie79174dd7ab3d266f1e3addefa5ba9e2128ea9f8
Right now there's no way to distinguish multiple clients, thus we cannot
associate IVehicleCallback from subscribe and unsubscribe method. As a
temporary solution we will use pointer to IBinder from underlying proxy
object until HILD will have some API to do that.
Test: verified unit tests run, checked that subsequent 'subscribe' calls
do not create new client objects in VHAL
Bug: b/37254245
Change-Id: I029564b7b03e4821287c2110d0929a5c4cbce0ce
This property is supposed to be used mostly from e2e tests (a simple
test-case is provided in separate CL)
Test: make -j && runtest -x packages/services/Car/tests/vehiclehal_test/
Bug: b/36510399
Change-Id: I09b24f22ab328eee1ef6add60901ed03bf046874
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h
Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h
Test: pass
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
Also rename DefaultVehicleHal to EmulatedVehicleHal and
extract emulator related code to VehicleEmulator class
Test: mm -j32 ; verified Car Service worked
Change-Id: I34361fdec6f94629cf7ef6c35ff56ef9ce78b855
Move default values closer to config declration to add properties
with less pain in future.
Test: mm -j32; verified if Car Service works
(cherry picked from commit 24ade17518)
Merged-In: I2f18837658149eb657f44d81e34eb8e6e497a25c
Change-Id: Ie4285581fa9d871b366b0ed2f08fa8073739a0a9
Also, removed per property ACL as it was based on client UID
Test: mm -j ; verified Car Service works
Bug: b/36649684
Change-Id: I7625a013dda8e3ebce5b86a253a8c1befe267c11
(cherry picked from commit 72aebeb3ec)
Move default values closer to config declration to add properties
with less pain in future.
Test: mm -j32; verified if Car Service works
Change-Id: I2f18837658149eb657f44d81e34eb8e6e497a25c
Also, removed per property ACL as it was based on client UID
Test: mm -j ; verified Car Service works
Bug: b/36649684
Change-Id: I7625a013dda8e3ebce5b86a253a8c1befe267c11
Use this infrastructure to move OBD2_LIVE_FRAME support over to the Vehicle HAL 2.0 layer.
This is useful in DefaultVehicleHal 2.0 to let the Emulator layer send/receive information about properties defined by later VehicleHal versions.
Additionally, support the notion that a custom property thusly defined might have logic more intricate than simply a property Id and an area Id,
via a custom handler object that supports get() and set() operations. A default handler object simply falls back to a stored VehiclePropValue, but
more complex implementations are possible.
Test: manual testing in Python:
import vhal_consts_2_0 as c
from vhal_emulator import Vhal
v = Vhal(c.vhal_types_2_0)
v.getConfig(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET)
print v.rxMsg()
v.setProperty(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET, c.VEHICLE_ZONE_ROW_1_LEFT, 70)
print v.rxMsg()
v.getProperty(c.VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET, c.VEHICLE_ZONE_ROW_1_LEFT)
print v.rxMsg()
v.getProperty(0x11e00d00, 0)
print v.rxMsg()
plus
runtest Obd2LiveFrame.java
Change-Id: I9c342e6e2c9ff581beacd238a42780ca10f96d9c
0xdeadbeef is exactly 32 bits, so it is interpretted as an unsigned
integer which was causing a warning. Since it's a test value, I changed
it to 0xdead which is interpretted as a signed integer.
Test: pass
Change-Id: Ibb75b23461700d77158e2337b8a472e87629ad61
Implemented RecurrentTimer class that can be used in VHAL
implementations to trigger an event every X amount of time.
This make sense for continous properties.
Also added linkToDeath for VHAL listeners.
Test: unit tests added and ran
Change-Id: I4a2e0607ff6b15b3e7babbe3fbb9fff8d4e28838
Test: build and flash Mojave board with TARGET_USES_CAR_FUTURE_FEATURES=true.
Test: check that the property is displayed in the logs during startup.
Bug: 35628104
Change-Id: I8b5327ae255cd94ac78a0436aac06b32e3168c28
Test: verified events are now gets propagated to CarSensorManager
(toggle day/night mode in Emulator UI)
Change-Id: Ifc4a755c5f6d31f41ab26ebc873c66c43d9e234a
Fix: b/35926101
Add properties to HVAC_POWER_ON config string
Return NOT_AVAILABLE for properties in HVAC_POWER_ON config string when
power is off.
Change-Id: Icfa06aa169345e973d2e152aa6dbd8c14f3a5d17
- Create base communications interface
- Refactor socket calls to use SocketComm class
Test: Use python scripts and custom emulator to test communications
Change-Id: Ia401587223035e748991516a2285cc31cb71a9c9
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
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.
Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.
Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
Add OBD2_DTC_INFO property to VHAL. This property returns a list of timestamps for which freeze frames are available to be read.
Make OBD2_FREEZE_FRAME indexed on timestamp, such that one has to pass a timestamp to retrieve the freeze frame at that timestamp.
Add OBD2_DTC_CLEAR to delete some or all of the freeze frames stored.
Test: build
Change-Id: I30344ffd6e7527f076b3382c32f5507973c9985b
Add emulator functionality to DefaultVehicleHal:
- Create default list of properties based upon DefaultConfig.h
- Add socket that is reachable via ADB to set/get vehicle properties.
BUG: 29601815
Test: Tested with Python interface from host.
Change-Id: I6f8e4cba37d927565e10797875eb8f5a1840a94f