Age | Commit message (Collapse) | Author |
|
This CL fixes a dead lock issue caused by RecurrentTimer holding
internal locks while calling actions. The dead lock is caused by
the following situation:
1. Caller holds a lock, call RecurrentTimer.registerCallback which
waits for RecurrentTimer's lock.
2. Another recurrent action happens at the same time. Recurrent
timer holds lock before calling the client action. The client action
is now waiting for the lock that is currently hold by 1.
Test: atest RecurrentTimerTest
Bug: 255574557
Change-Id: I3999f4e9cdf581cb851d5f49341dbcc0c160f234
(cherry picked from commit 93a821077effec224d3880875d98c13ef1787e4c)
|
|
Previously we used elapsedRealtimeNanos in recurrent timer which will
still go even if the system is in deep sleep. This causes all the
events "happened" during suspension to be replayed immediately
after the wake up, which causes a spam of messages. uptimeNanos
meanwhile, does not go if the system is in sleep, so we use that
instead.
Test: atest VehicleHalVehicleUtilsTest
Bug: 235262127
Change-Id: Ib67c2e2251af3231cefd875416d5bcb15953ba5e
Merged-In: Ib67c2e2251af3231cefd875416d5bcb15953ba5e
(cherry picked from commit 5e508737934feb595c841430f41b5edb1d1925d5)
|
|
Test: atest CarPropertyManagerTest
Bug: 237610879
Change-Id: Ibff9b429110ee72f28b109ac193df21ad395de51
|
|
Add an option to specify whether to trigger onpropertychange callback
when VehiclePropertyStore.writeValue is called.
Test: atest VehiclePropertyStoreTest
Bug: 237318964
Change-Id: Iefd572c96f67dab2ecd5de56acf2e0d1c9b58939
|
|
Update the implementation for subscription logic. Add clearer
documentation for sampleRate and timestamp behavior. The sampleRate
specified in subscribeOptions is just a guidance to tell VHAL what
the polling rate could be. For timestamp, the timestamp returned
for each property must be the timestamp when that property is
updated, not when the property is retrieved.
Test: atest FakeVehicleHardwareTest
Bug: 225191802, 226000926
Change-Id: I1e886133258236eedfa7fcffe5c4fb49aead4f6f
|
|
Define a VhalResult alias to represent Result that contains a VHAL
StatusCode as error type. This alias helps client to easier migrate
from android::base::Result to VhalResult.
Test: Presubmit
Bug: 219612366
Change-Id: I17f15044ee962c7148b0adc3925e0b0a9dfab2a8
|
|
Add proper lock to make sure that all resources would be cleaned
up for a client if the client died. Also add check and not to
allocate resources for an already dead client.
Test: atest DefaultVehicleHalTest.
Run manually and do not see 'failed to call callback' messages.
Bug: 221500501
Change-Id: I1c799a6234017b976e7776537ab91526e785b9b4
|
|
Define a wrapper class for StatusCode to be used as E in
Result<T, E>. By default E is errorno as defined in linux and does
not print out the correct error message.
Migrate existing Result usage in VHAL to Result<T, VhalError>.
Test: atest VehicleUtilsTest
Bug: 219612366
Change-Id: Ic5369b6035bc46afc4c61da26c4b50f7fa9969d8
|
|
Bug: None
Test: atest FakeVehicleHalValueGeneratorsTest
Change-Id: I6df508e148ff0348fc28b467b4e5a70cf5727a27
Merged-In: I6df508e148ff0348fc28b467b4e5a70cf5727a27
(cherry picked from commit 6ae468c1e39f72456416697ee7cf483dcf0c6f3b)
|
|
Test: Presubmit
Bug: 214635003
Change-Id: I402725599ec22574ed2bd5620e9b9328ff1800f4
|
|
Test: Presubmit.
Bug: 215443397
Change-Id: If8d3556e06119d12f515dc68a591e0f342761d6f
|
|
Rename the existing vendor version VehicleHalUtils to
VehicleHalUtils vendor and then create a non-vendor version of
VehicleHalUtils.
Test: Presubmit
Bug: 214635003
Change-Id: I7717d2e9527b9dd8592bbdff152aab4ef1b80a10
|
|
Move PendingRequestPool and ParcelableUtils to utils so that we could
reuse it for cpp VHAL client.
This CL also fixes a bug that the comment for PendingRequestPool
timeout unit is incorrect.
Test: atest VehicleHalVehicleUtilsTest
Bug: 214635003
Change-Id: Ie8ac1e0c4f49ae70caff7b680a7352fc23d4e680
|
|
Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: I4e7b31af7fa2af445f9bac6ec71dad3bf6c0b8b3
|
|
Add a class to manage VHAL subscription. It supports subscribing
and unsubscribing to properties. For continuous property, it uses
recurrent timer to recurrently calls the registered function. For
on-change property, it would return all subscribed clients for a
given property.
Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: I3e1a0401fd465dc31fe08ea77d5a6651fa7bbfaf
|
|
Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: I702d139d2f1c0eb647559dde88deb0486c986c66
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 200737967
Change-Id: I0e6eed7d085af2a45448efa845e3e8f66c0a84ce
|
|
Add some helper functions to manage parsing/marshaling large
parcelable.
Test: None.
Bug: 200737967
Change-Id: I48729915aafe6d23de725e38ca5f653ba3147253
|
|
Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: Id0152cb2dbf489f5d709845108b87961f6d9a019
|
|
Handle fake user hal properties in FakeVehicleHardware.
Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: Ia60bbf7ae6a0fc5909dc8d27363af5c9939055d3
|
|
Test: atest FakeObd2FrameTest
Bug: 201830716
Change-Id: I1d83db2b0a1eb08ddc86c2a6106403edb73b6536
|
|
Test: atest FakeObd2FrameTest
Bug: 201830716
Change-Id: Ibd460ab4c129707d567689d90979ca0424551a64
|
|
Allow vendor to override default properties in fake VHAL hardware.
Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: Ie6061d7a8123e3b22c6fa467639f1fe77dec222c
|
|
Test: atest FakeVehicleHalValueGeneratorsTest
Bug: 201830716
Change-Id: Ic113c9b189a07140a288d6d03d3a8a2b9061881f
|
|
Migrate fake value generator hub. This CL also turns all exising
LockGuard to ScopedLock.
Test: atest FakeVehicleHalValueGeneratorsTest
Bug: 201830716
Change-Id: I3ce64792fa5a49ae5e11e1fc5636a30221c596e6
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 201830716
Change-Id: I78671befd8351f17bf3da43372ec302e106690de
|
|
Add error code to differentiate between different error cases, e.g.
when the value is not configured v.s. the value is not set.
Test: atest VehicleHalVehicleUtilsTest
Bug: 201830716
Change-Id: I1ef0716edce5bc72e07a769026769a330b4e3025
|
|
Add a fake vehicle hardware implementation that uses default config.
This would be used in emulator.
Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: If93bdebb5c82b947a327688db80978fc4cb46d3c
|
|
Add on-value-change callback to VehiclePropertyStore. When a new
value is written to propStore or a value is updated, the callback
would be invoked which could be used to inform VHAL client about
value updates.
Test: atest VehicleHalVehicleUtilsTest
Bug: 201830716
Change-Id: I980f5e8c34d9f872f962776859de9615ce3bf690
|
|
Use object pool recyclable objects in property store API to improve
code efficiency. This would reduce the number of unnecssary copy of
property values.
This CL also adds a upateStatus option which by default is set to false,
so property from client would not override the property status.
Test: atest VehicleHalVehicleUtilsTest
Bug: 200737967
Change-Id: Ie96a41ee441e085e10ad1059b67c708ff7173ae0
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 199337732
Change-Id: I93772c401dc077f1fbab79e302336494039308d1
|
|
Migrate proto_message_converter to AIDL vhal. This would be used
in grpc vehicleClient/vehiclServer. This CL also creates the
required proto files.
Test: unit tests.
Bug: 199337732
Change-Id: Iac69a8c1578d4aba374ee0d9716da8b6b18ccace
|
|
Since VHAL is not supposed to run on all devices, only auto targets,
we change the test suites to device-tests. This also prevents the
unit tests to be run against an incompatible version of vendor
image, which causes test breakage.
Bug: 201009483
Test: presubmits
Change-Id: I8878ce6f8200dbc4a3247258f835e980fbaa2028
|
|
Test: Local build.
Bug: 198664004
Change-Id: Ifd8b15d85865f360f9cce7b35bc2114f4478682c
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 199337732
Change-Id: Ia18699a0115fdb004c57c0e6fb02b043ddb138b5
|
|
Add some utility functions to AIDL VHAL.
Test: atest VehicleHalVehicleUtilsTest
Bug: 199337732
Change-Id: I9e74161efecf7c66caa2f52177fbdd43cdc9d68b
|