The rest of the API (*::analyseStatus) returns NOT_SUPPORTED
when the legacy API returns -ENOSYS.
setParameter legacy -> treble shim did not follow this
conversion due to the legacy API stating that for get_paramers,
-ENOSYS should be returned if
"the implementation does not accept a parameter change while the
output is active but the parameter is acceptable otherwise",
aka INVALID_STATE.
Thus setParameter shim used to return
- OK for OK
- INVALID_STATE for -ENOSYS
- INVALID_ARGUMENTS for everything else
This leads to several problems:
- an implementation of the legacy API can not report NOT_SUPPORTED
- is inconsistent with the rest of the status_t conversion methods
- shim methods implemented over getParameter can not distinguish
failures error required by the .hal documentation
Most importantly, on the system side, the Result is transformed to a
status_t again but without any special logic for methods wrapping
getParameter in the shim.
See: analyzeResult in
frameworks/av/media/libaudiohal/2.0/ConversionHelperHidl.cpp
This can not be changed as the system can not know which methods
are implemented with a legacy wrapper under the Treble API boundary.
This mean that if:
- hal return -ENOSYS ()
- shim converts it to INVALID_STATE
- libaudiohal converts it to NOT_ENOUGH_DATA ()
Thus the checkForNewParameter_l's "status == INVALID_OPERATION"
test in frameworks/av/services/audioflinger/Threads.cpp
are now always false and broken.
This has been broken since the introduction of the Treble shim for O.
Thus setParam now converts status_t to Result in the same way
as all the other shim methods.
Bug: 72873273
Bug: 69811500
Bug: 69010523
Test: playback and record for media and voice call
Change-Id: I41204c0807d2bd4675e941771cbc9a43d7d14855
Merged-In: I41328afce56ce31d4a26159ca2d4b16d14cce05b
Signed-off-by: Kevin Rocard <krocard@google.com>
Test: Nfc Enable/Disable; test if config is read in logcat
Bug: 77496460
Merged-In: I13e21ba18c03c3c7b9eff3aa67e843e7f063b233
Change-Id: I13e21ba18c03c3c7b9eff3aa67e843e7f063b233
(cherry picked from commit c200342182)
* changes:
matrix: ENFORCE_NO_UNUSED_HALS
matrix: generalize case for LOCAL_WARN_REQUIRED_HALS
matrix: IGNORE_TARGET_FCM_VERSION -> VINTF_*
matrix: define LOCAL_MODULE for all modules.
Use Dummy APDU and Android CTS AID for the test cases.
Test: Run VtsHalSecureElementV1_0TargetTest
Bug: 77296379
Change-Id: Id5397c9efb000a1737176ebacb6ded0837dc2d61
Enforce that all hals in the device manifest are
in framework compatibility matrix -- at build time.
Bug: 65028233
Test: build a phone without DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX.
Change-Id: Ibf220f80ca3621ddbf8288d372d5f40336e45248
Add LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE and
LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE for a more generic case.
Test: m framework_compatibility_matrix.xml -j
Bug: 65028233
Change-Id: Iec142d161daa18122e7a6daebb82c7230cb98ba6
All "private" environment variables to assemble_vintf
(inserted by the build rules, not build system variables)
should have this prefix (to distinguish against,
e.g. PRODUCT_ENFORCE_VINTF_MANIFEST)
Test: m framework_compatibility_matrix -j
Bug: 65028233
Change-Id: Iaefa88cefc0918fb86235ea6fcd8e367cbd82788
... along with compatibility_matrix.device.xml.
The new module cm.device.xml contains the original content
of empty.xml (kernel configs, sepolicy, etc.) as well
as HALs from DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
This variable points to a framework compatibility matrix
that contains framework HALs as a vendor extension; all
HALs in this file must be optional.
Bug: 65028233
Test: m framework_compatibility_matrix.xml -j and manual inspection
Test: vts_treble_vintf_test
Change-Id: I94949f62f7f5b332d845f2e7fa4714df7c49ed3e
ComposerClient destroys its internal model of the display while handling
the onHotPlug event from the Hwc. Subsequently SurfaceFlinger destroys
its model of the display, and destroys all Hwc layers associated with
the display.
This fixes the code for destroying layers to not dereference an invalid
iterator if the display does not exist, allowing destruction to
continue.
It also fixes a similar issue which could occur if a HWC layer is being
created for a display at around the same time as the disconnect event.
Test: hotplug disconnect no longer crashes
Bug: 38464421
Change-Id: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
Merged-In: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
(cherry picked from commit 2765f9d406)
This is used to make the phone appear off by init
during late boot (e.x. fsck for disk health), so
it should shut off all lights (not just the screen).
Bug: 74976325
Test: blank_screen
Change-Id: I790cc3dd856c2c2095fa3cf82519fd30834304ca
Merged-In: I790cc3dd856c2c2095fa3cf82519fd30834304ca
Required because the lights need to be turned off late in boot
(e.x. during fsck for disk health), and before, blank_screen
accessing light encountered a race condition where if it didn't
get scheduled before all of the processes which were getting
shutdown were getting killed, the screen wouldn't blank.
Bug: 74976325
Test: adjusting brightness continues to work
Test: screen blanks during shutdown at the correct time
including when an artificial 5s delay is inserted when
the phone normally fscks (which can also be quick)
Change-Id: I57ebc11d7ecf57ee327c681455712f4b53de6fd3
Merged-In: I57ebc11d7ecf57ee327c681455712f4b53de6fd3
* changes:
Relax NeuralNetwork's VTS positive and negative base tests
Add Capabilities::relaxedFloat32toFloat16Performance for 1.1.
Minor modification to allow relaxed precision test
NNAPI narrow evaluation for P -- HAL
Refactor NN API VTS tests and add v1.1 tests
Add README to NeuralNetworks HAL
There are some NN VTS tests that assume a service is able to generate a
model consisting only of a floating point add operation. However, some
drivers do not support floating point operations. This CL relaxes the
test requirements to allow a test to be skipped if the service does not
support floating point add.
Bug: 72764145
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest
Merged-In: I6b0644432680fc2f8098b5187795dc2953df03f9
Change-Id: I6b0644432680fc2f8098b5187795dc2953df03f9
(cherry picked from commit 4d5bb1097a)
Bug: 63911257
Test: mm
Test: VTS test pass on walleye
Merged-In: I41d9ea782262a894e7dbd00b782803c40b31c430
Change-Id: I41d9ea782262a894e7dbd00b782803c40b31c430
(cherry picked from commit 842e1a0331)
We have determined that for Android P it is sufficient to have a
mechanism for a developer to specify on a per-model basis that it is
acceptable for FLOAT32 operations to be carried out as if they were
FLOAT16 operations. This CL extends the model to include information on
these precision requirements.
Bug: 63911257
Test: mm
Test: NeuralNetworksTest
Test: VtsHalNeuralnetworksV1_0TargetTest
Merged-In: I5331e69c05c20c588035897322a6c7dceca374a0
Change-Id: I5331e69c05c20c588035897322a6c7dceca374a0
(cherry picked from commit 7ffe78ba76)
- Create VtsHalNeuralnetworksTest_utils module to be shared between
v1.x tests.
- Split the existing tests into two categories: basic, and generated.
- Created v1.1 VTS tests ensuring no regression in existing ML models.
Bug: 63911257
Test: mm
Test: NNAPI VTS tests pass on v1.0 and v1.1 sample drivers
Merged-In: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
Change-Id: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
(cherry picked from commit a2d04c828e)