This change removes the 'blocking' parameter for the
ResilientPreparedModel::Factory and ResilientBuffer::Factory. The
'blocking' parameter is only useful for ResilientDevice::Factory, which
behind the scenes chooses between the HIDL calls IDevice::getService and
IDevice::tryGetService. The equivalent calls for IPreparedModel and
IBuffer are not used, as both are created from the IDevice object.
This change also modifies the ResilientDevice's device recovery
behavior. Prior to this change, ResilientDevice's recovery mechanism had
the following behavior:
* attempt to call a function
* if the function did not return a DEAD_OBJECT error, return
* if the function returned a DEAD_OBJECT error, attempt to recover the
device
* whether or not the recovery succeeded, call the function again
This CL changes the behavior so that if device recovery fails,
ResilientDevice will not call the function the second time.
Bug: N/A
Test: mma
Change-Id: Icf37d05c884c740178324fcd046ea56914ef7d44
Merged-In: Icf37d05c884c740178324fcd046ea56914ef7d44
(cherry picked from commit 11761e37a8)
This CL introduces a new templated class CallbackValue to handle HIDL
"return value" callbacks in a terser and more readable way.
This CL also introduces a new macro HANDLE_HAL_STATUS to return from the
current function when an error is present with the ability to append a
more descriptive error message.
Finally, this CL changes the behavior of synchronous executions. Prior
to this CL, IPreparedModel fell back to an asynchronous execution if the
synchronous execution was allowed and failed. This change instead
returns a failure if synchronous execution is allowed and fails.
Bug: 173084343
Test: mma
Change-Id: I62714a932e71dfc77401bbcb9eaaaf3d94fb9707
Merged-In: I62714a932e71dfc77401bbcb9eaaaf3d94fb9707
(cherry picked from commit 98ed9baf5d)
This CL copies information from
packages/modules/NeuralNetworks/runtime/VersionedInterfaces.cpp and
modifies the description to be more appropriate for the NN HAL utility
code.
Specific sections added to the README:
* "HIDL Interface Lifetimes across Processes"
* "Protecting Asynchronous Calls across HIDL"
Bug: 170289677
Test: mma
Change-Id: Id381895535d708b627f4746687b4d12e16560639
Merged-In: Id381895535d708b627f4746687b4d12e16560639
(cherry picked from commit 7a655bb3d4)
A sibling CL to this CL changes the definition of nn::TimePoint to the
same type as std::chrono::steady_clock::time_point but has changed the
underlying duration representation to use uint64_t. That sibling CL also
renames nn::OptionalTimeoutDuration to nn::OptionalDuration, and changes
the definition to the same type as std::nanoseconds except the
underlying duration representation now uses uint64_t.
This CL makes changes to the NN HAL utility code in response to the
changes in the sibling CL.
Bug: 174297663
Test: mma
Test: NeuralNetworksTest_static
Change-Id: If44d9aefadb2c78b632ff289b5ff5a49f766525c
Merged-In: If44d9aefadb2c78b632ff289b5ff5a49f766525c
(cherry picked from commit ca11420785)
* replace NullOr with std::optional.
* Add mising tag.
* Undefine helper macros so that keymint_tags.h can be used together
with keymaster_tags.h
* Check if KeyParameterValue variant matches KeyParameterTag in
accessors.
Test: VtsAidlKeyMintTargetTest
Change-Id: I6c951071f30fd27c8c21a2e8cc86f421a3bc37d9
AIDL now supports union types. This CL changes KeyParameter to use
one.
Test: VtsAidlKeyMintTargetTest
Change-Id: I5112611b161e3de1ea86105ea3c7ed0912036a7b
Major challenge: the configuration of HAL tests
depends on the APM XML configuration file which may be
invalid. The code that reads the configuration
has been updated to avoid crashes when the config
is invalid.
In CheckConfig_audioPolicyConfigurationValidation the
dependency on the config parser was removed. Previously,
a failure to parse the config by the config parser would
lead to the test being skipped, which isn't correct
as it must fail in this case.
Minor fixes to V7 tests to pass on a real life legacy HAL.
Bug: 36733185
Test: run VtsHalAudioV7_0TargetTest on a device with V6
Test: run VtsHalAudioV7_0TargetTest on a device with
a side-loaded V7 and invalid APM config file
Test: run VtsHalAudioV7_0TargetTest on a device with
a side-loaded V7
Change-Id: I746339ff69ab455dc64eef9a17827d047b357329
* changes:
HidlUtils: remove temporary conversion functions
audio: Update default effect HAL wrapper to support V7
audio: Update default wrapper to support V7
audio: Extend HidlUtils for the default wrapper needs
Remove temporary conversion functions and update
the code that was using them.
Bug: 142480271
Test: m
Change-Id: Idf36dbac398efbc03bd6da68c79f6fb1ddc24e9c
Merged-In: Idf36dbac398efbc03bd6da68c79f6fb1ddc24e9c
During this conversion, the functionality of the V7 wrapper
hasn't been tested yet. This will be done in a separate CL
that will also include required updates to the VTS tests.
Since the changes were made to the code shared with pre-V7
versions, verified that V6 HAL didn't regress.
Bug: 142480271
Test: atest VtsHalAudioEffectV6_0TargetTest
Test: m VtsHalAudioEffectV7_0TargetTest
Test: m android.hardware.audio@7.0-service.example
Change-Id: I72389c8d564596bef22b47dfdcb2e77d636ef0a3
Merged-In: I72389c8d564596bef22b47dfdcb2e77d636ef0a3
During this conversion, the functionality of the V7 wrapper
hasn't been tested yet. This will be done in a separate CL
that will also include required updates to the VTS tests.
Since the changes were made to the code shared with pre-V7
versions, verified that V6 HAL didn't regress.
Bug: 142480271
Test: atest VtsHalAudioV6_0TargetTest
Test: m VtsHalAudioV7_0TargetTest
Change-Id: I0e42fe1279912ffa78ce40c69f6aa2054e84d385
Merged-In: I0e42fe1279912ffa78ce40c69f6aa2054e84d385
Add conversions used by the default wrapper.
Promote some conversions to pre-V7 interface to reduce
version-based forking in the default wrapper code.
Bug: 142480271
Test: atest android.hardware.audio.common@7.0-util_tests
Change-Id: I93c482eeaf08442271be2656693be5395ca53762
Merged-In: I93c482eeaf08442271be2656693be5395ca53762
Revert "libmemtrack: Add support for AIDL memtrack HAL"
Revert "Add stable aidl memtrack HAL to product packages"
Revert "Add stable aidl memtrack hal to vndk list"
Revert "Memtrack HAL stable aidl sepolicy"
Revert "Add android.hardware.memtrack-unstable-ndk_platform"
Revert submission 1518702-memtrack-aidl
Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy
Change-Id: I4a9e3522afe9e9189b7eddc9520d5ef2e2b74520
The native_handle API is notoriously tricky to work with, and this is
expected to be very common. So, adding a small helper library.
Fixes: 175432703
Test: atest libaidlcommonsupport_test
Change-Id: I4a00d2b14fefe6c979ee656e353e117661a1a483
As described in source.android.com/devices/architecture/hidl/safe_union
value must be assigned through generated getter, rather than assigning it directly.
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Bug: 150670922
Change-Id: Iefc7ee98163ec2b3387fc01c3d69c1dcd15e94bc
Meet timeout when run NNAPI VTS on some A35 CPU device.
Enlarge the single-test timeout from 1m to 20m.
Bug: 175510656
Test cases:
VtsHalNeuralnetworksV1_0TargetTest
VtsHalNeuralnetworksV1_1TargetTest
Change-Id: I869208c79ff4c1d1928603a5630f456915928957
* changes:
audio: Use docstrings instead of comments in types.hal files
Implement a.h.audio.common@7.0-util module
Move UUID conversions into their own class
This is no longer needed in KeyMint. Keystore2 implements similar
functionality in Rust.
Test: Build
Change-Id: Ia43716449756935619fb22ef5aba113e420c2687
Because AIDL doesn't allow tag values to be constructed the way we
did in HIDL (and before), each tag definition carries a comment
specifying what the "magic" tag type value used in its construction
means. This CL moves those comments so they're adjacent to the value
they're documenting.
Test: Build
Change-Id: I30b037f9ddf6bf2b07326a53959d490e045c891a
Mostly just removal of old-style #include guards in favor of #pragm
once, reorganization of header includes, correction of copyright
years, etc.
Test: VtsAidlKeyMintTargetTest
Change-Id: I070584ecec550a2f133b1c19f36f99e7b5544e7c
Converted comments into docstrings for enums and structures
in Audio HAL V7 definition.
Bug: 142480271
Test: m
Change-Id: Id5e36e7a42e2600ab69612819f8260110871c711
Merged-In: Id5e36e7a42e2600ab69612819f8260110871c711
This includes a rewrite of HidlUtils for V7.
A unit test is added for its conversion functions.
Made necessary minor adjustments to the HAL V7 types.
Also, fixed definition of 'audioFormatsList' to allow for
vendor extensions.
Bug: 142480271
Bug: 173647783
Test: m && atest android.hardware.audio.common@7.0-util_tests
Change-Id: Ib883f1c246fce78c004846516699aa724d4b5d44
Merged-In: Ib883f1c246fce78c004846516699aa724d4b5d44
Mechanical extraction of HidlUtils::uuidFrom/ToHal into
a dedicated class UuidUtils.
Bug: 142480271
Test: m
Change-Id: Ic5333ba32dc293f32c5562d0ef05bde8e5f9b302
Merged-In: Ic5333ba32dc293f32c5562d0ef05bde8e5f9b302
1ffcdebadd
Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I691cad252f188b54a8076589d9955774d74d4729
There are several test cases that may take longer duration to complete.
Extend the timeout value to ensure there is sufficient running duration.
Bug: 174717076
Test: atest VtsHalNfcV1_0TargetTest
Change-Id: I4fc15184f0715131c45247820e1edbaae511b8a3