There are certain pieces of NeuralNetworks.h and of our various *.hal
files that ought to be kept in sync -- most notably the operand type
and operation type definitions and descriptions in our
NeuralNetworks.h and types.hal files. To avoid having to do this
manually, a tool can be employed.
The old solution to this problem is sync_enums_to_hal.py, which parses
the existing NeuralNetworks.h and types.hal files, and then rewrites
the types.hal files: It identifies the operand type and operation type
portions of the files, and in the types.hal files replaces them with
transformed versions of the portions from NeuralNetworks.h. This
approach is brittle -- it is very sensitive to the structure of the
files, as was recognized when this tool was created. Changes to those
files since the script was last updated essentially broke the script,
as noted in http://b/140132458.
The new solution employs a new tool generate_api.py to combine a
single "specification file" with one "template file" per API file
(NeuralNetworks.h or types.hal) to produce that API file. The script
generate_api.sh invokes generate_api.py once per API file, passing
appropriate arguments. See frameworks/ml/nn/tools/api/README.md for
more details.
In the process of combining information from NeuralNetworks.h and
*/types.hal, some formatting, syntactic, and semantic changes have
been made to those files. For example:
- types.hal files no longer refer to API levels or (similarly)
to HAL versions other than earlier HAL versions
Bug: 130169064
Bug: 140132458
Test: cd neuralnetworks ; mma
Change-Id: Iceb38effc2c7e6c32344e49225b85256144c0945
Merged-In: Iceb38effc2c7e6c32344e49225b85256144c0945
(cherry picked from commit 2cae5c8b01)
libsnapshot needs to communicate to the bootloader that a merge is in
progress. This can be used to prevent factory data resets, prevent
flashing or wiping userdata/metadata, and warning when the active slot
changes.
Bug: 138861550
Test: builds
Change-Id: I577877696b5ec6920b9520d518374931ce9ddfaa
Merged-In: I577877696b5ec6920b9520d518374931ce9ddfaa
During the transition to Treble, "device connect" / "disconnect"
parameter was erroneously attributed to audio streams. This
issue got fixed in Audio HAL V4.0, but AudioParameter file
was still using incorrect name for the constant.
Test: make
Change-Id: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b
Merged-In: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b
hwservicemanager will now shutdown the service when it is not in use.
This puts less restrictions on clients.
Bug: N/A
Test: build only (this is an example implementation not used on any
device)
Change-Id: I4641e727f6e4c3ca5d97d53a66b3cc0fee6f12f3
Update the documentation of NetworkScanRequest to clarify
that the interval between scans is from the completion of
one scan to the start of another. This is the only possible
definition that doesn't possibly result in back-to-back
scans which never complete.
In the initial design of this API, the stated use case was
for scans where "interval" >> "scan duration". For that
use case, this clarification doesn't make a meaningful
difference; however, for the use case of long-duration
scans, the distinction prevents the issue stated above.
Bug: 139935383
Test: compilation (docstring-only change)
Change-Id: Ib8393110bfd3ea883045648ee7dac9c6e6a32d44
Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE.
In Vehicle environment some hals communicate with external ecu,
so they must know the boot reason.
(Not only on, but DEEP_SLEEPY_EXIT, ON, CANCELD)
To handle this, AOSP provide CarPowerManager, but it use AIDL.
But, in treble, vendor process must communicate with system process via hidl.
So, vendor processes(almost hal), can't use CarPowerManager.
(Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder).
If hals subscribe AP_POWER_STATE_REPORT via vehicle hal,
they can handle the power state.
bug: 140370318
Merged-In: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Gralloc0 does not support layers. This change is needed for Cuttlefish
to pass the GraphicsMapperHidlTest.ValidateBufferSizeBadValue VTS test
Bug: b/132087346
Test: vts-tradefed run commandAndExit vts -m VtsHalGraphicsMapperV2_1Target
Change-Id: I2ed7dae209629d401ccaf2fc0fd992d766b0fa9b
The order of the planes doesn't matter, therefore enable mapper
adapter to support YCbCr and YCrCb both.
test: manual
bug: 141006723
Change-Id: Iad0d5159c1b38b12bc90a07f937db002471aad1e
This warning was turned off globally but it is only needed for few
projects. Move the flag to the individual project blueprint files.
Test: presubmit
Change-Id: I55163067ac5038f1650ad12300bf72a48f179b8e
This CL removes a dependency on the VTS test runner by dynamically
discovering all NN HAL service instances in the gtest binary itself,
and runs through all service instances with parameterized tests.
This CL converts TEST_F cases to TEST_P cases, where the test parameter
is the name of the service instance. For existing TEST_P cases (such as
the generated test cases), the service instance name is made to be the
first test parameter.
This CL enables the NN VTS tests to be more portable, e.g., they can
run directly as a presubmit test.
Fixes: 124540002
Test: mma
Test: VtsHalNeuralnetworksV1_*TargetTest (with sample-all)
Test: cd $ANDROID_BUILD_TOP/hardware/interfaces/neuralnetworks && atest
Change-Id: I1e301d7c9f9342bb8f35a267bef180f510944b19
Merged-In: I1e301d7c9f9342bb8f35a267bef180f510944b19
(cherry picked from commit 7076f629b7)
This CL additionally adds missing documentation for timing
information when returning results on the resultChannel.
Bug: 133773876
Test: mma
Change-Id: I1eb1affbb4a912d5fdeab012e2be7e7005deb04d
Merged-In: I1eb1affbb4a912d5fdeab012e2be7e7005deb04d
(cherry picked from commit f99bffd08a)
1. AES operation attempted with unauthorized purpose.
2. AES-GCM encryption performed with different nonces, should
generate different ciphertexts.
3. AES-GCM encryption decryption round trip with delays between
begin and update and finish.
Bug: 133258003
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: Ia8b4b4b317ecff51b18e64dfa3b84bf77475812d
Currently tests that check for incremental scan interval
range-checking have incremental scans disabled.
This CL turns on incremental scans for tests where the
invalid interval range checks are being validated.
Set Incremental Results to true for InvalidPeriodicity
Tests in Radio 1.4. This is a spiritual cherry-pick of
the exact same test copied from HAL 1.2.
Related Change-Id: I94874f538d2df70a72913b489d9298f8d1cf9b56
Related Sha: 81c811b895
Bug: 138317383
Test: atest RadioHidlTest_v1_4#startNetworkScan_InvalidPeriodicity1
Test: atest RadioHidlTest_v1_4#startNetworkScan_InvalidPeriodicity2
Change-Id: I20d6423c01dfc1c708514e798589c36666f2c0d4
Replace libcrypto with libcrypto_static, which can be protected through
visibility to ensure only modules that don't affect FIPS certification
can use it.
Bug: 141248879
Test: m checkbuild
Change-Id: I8685cb06d15f3425eeb96d998ffda54c82dcd387
When users call Mapper:freeBuffer, Mapper will erase buffer handle from mBufferHandles.
No matter the result of free buffer handle returned from gralloc, buffer handle is removed from mBufferHandles.
This means that a buffer handle can not be freed twice, even if it fail to be freed at the first time.
Because users will receive nullptr when they call freeBuffer to free the same bufferHandle at the second time.
When freeBuffer is called, Mapper only looks for input buffer in mBufferHandles instead of erasing it from mBufferHandles.
If the result of freeBuffer returned by gralloc is NONE, then remove the buffer handle from mBufferHandles.
Test: Manual
Bug: 141145482
Change-Id: I4e27f54eb219f23a5844d6b440d7160b296c31e2
Under certain circumstances, we guarantee that a prepared model can be
executed successfully. In describing those circumstances, we
neglected to specify that operation input operands must have legal
values for the guarantee to hold. For example, the guarantee doesn't
hold if an ADD operation has an activation input that is not one of
the defined values; or if a RESHAPE operation has a shape input in
which two or more components are -1.
This change modifies the guarantee to apply only when operation input
operands have legal values. It also documents this guarantee for
burst execution.
Note that if an operation has an input operand that can be proven to
have an illegal value at preparation time (e.g., a constant value that
is illegal), model preparation might (but is not required to) fail for
that reason.
Bug: 135933040
Test: $ cd neuralnetworks ; mma
Change-Id: I8b421550dd89e4bbbdae899e7cb5e9e88a46d2fb
(cherry picked from commit 48544cc38a)