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)
|
|
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
|
|
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
|
|
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
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 200737967
Change-Id: I0e6eed7d085af2a45448efa845e3e8f66c0a84ce
|
|
Allow vendor to override default properties in fake VHAL hardware.
Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: Ie6061d7a8123e3b22c6fa467639f1fe77dec222c
|
|
Migrate fake value generator hub. This CL also turns all exising
LockGuard to ScopedLock.
Test: atest FakeVehicleHalValueGeneratorsTest
Bug: 201830716
Change-Id: I3ce64792fa5a49ae5e11e1fc5636a30221c596e6
|
|
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 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
|
|
Test: atest VehicleHalVehicleUtilsTest
Bug: 199337732
Change-Id: Ia18699a0115fdb004c57c0e6fb02b043ddb138b5
|