Commit Graph

47265 Commits

Author SHA1 Message Date
David Drysdale
810fbcffed Fix attestation error checks
Avoid the ADD_FAILURE at the end if attestion ID failure uses an allowed
return code.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
Change-Id: I0dcac312ac4516a078b2742721e3a19074da52b1
2023-07-04 13:14:12 +01:00
Treehugger Robot
e959d0923d Merge "Revert "Fix VTS Fuzz issue"" 2023-07-03 12:43:04 +00:00
Guillaume Bailey
a2b4a18ab7 Revert "Fix VTS Fuzz issue"
This reverts commit 1adfae9364.

Reason for revert: Causes Sabrina/Boreal bt stacks to timeout on startup
Bug: 247053367

Change-Id: Ibef97f054510c826920bb30725fed168c755cc14
2023-07-03 12:10:36 +00:00
Zhanglong Xia
7ae6d6f4ff add Spinel SPI interface support
This commit enables the Thread Network HAL to support the Spinel
SPI interface.

Bug: 277286756
Test: Build and run otbr-agent on the emulator.
Change-Id: I6726eead5686f0afb33e5e2035ebc9021eca5afa
2023-07-03 11:59:17 +08:00
Zhanglong Xia
59b018679b Merge changes from topic "cherrypicker-L18700000961261875:N88400001378560897"
* changes:
  add fuzz test and fix the Thread network HAL compile errors
  Add Thread network HAL
2023-07-01 00:12:41 +00:00
Mikhail Naganov
49712b56d8 audio: Add DriverInterface::start method
This method is used to bring out the hardware from standby.
It replaces the ad hoc 'exitStandby' method in StreamUsb.

Streamlined StreamUsb code to avoid locking during transfers.

Updated StreamRemoteSubmix to use 'start'.

Added extra checks to StreamStub to ensure that 'init/shutdown'
and 'standby/start' methods are called as expected. This allows
removing extra checks from non-stub stream implementations.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3615a7ca99cb4f1e149dcbfbc912f2ed58fb033f
2023-06-30 13:41:55 -07:00
Treehugger Robot
12e6f0c42e Merge "Audio : Add remote submix stream implementation" 2023-06-30 16:11:17 +00:00
Treehugger Robot
a2d5a26476 Merge "vts: Don't excercise data path for offloaded/bypass effects" 2023-06-30 12:55:47 +00:00
Shraddha Basantwani
6bb696370b Audio : Add remote submix stream implementation
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia477458193ade9068eaf56e953ab670fee53cc7d
2023-06-30 09:05:50 +00:00
Shunkai Yao
afb60c5bb1 Merge "Support passing entire effect_param_t as vendor extension" 2023-06-30 01:06:35 +00:00
mike liao
62334235e8 Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916 am: 1b000d1343
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: Id7ec0c1fae71d7e6f4cf6676222f24f723bcc9e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:33:22 +00:00
mike liao
1b000d1343 Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I97914a24ec13a8c8278877907bd6f68012a0deb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:05:48 +00:00
mike liao
d8baeb3916 Add fix vts fail when configureMonitorEvent am: b79cbf50f1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I48d3c2ecee071096c1b94c94293bb9b1cc39f839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 23:22:37 +00:00
Jin Chen
a0920e2e62 Merge "[uwb](hal) Add radar support" 2023-06-29 20:20:45 +00:00
Jesus Sanchez-Palencia
5cf8e8e2ea Merge changes from topic "lights-aidl-rust-derive"
* changes:
  lights: Add state to the example service
  lights aidl: Add required @Rust derive statements
2023-06-29 19:33:07 +00:00
Shunkai Yao
beef909697 Support passing entire effect_param_t as vendor extension
Replace the UUID toString with hex version

Bug: 271500140
Test: Enable AIDL
Test: atest libAudioHalEffectParamTest
Change-Id: I79a5db25dc45774821a9a9a6bcda77c04e9da90d
2023-06-29 18:18:20 +00:00
Jesus Sanchez-Palencia
c5521aef12 Merge "lights: Re-write example service in Rust" 2023-06-29 18:16:50 +00:00
Jesus Sanchez-Palencia
c0544589b8 lights: Add state to the example service
Add a Light struct to the example service so it can hold a HwLight and
its associated HwLightState. Also added a HashMap of ids -> Light to the
LightService and updated the HAL methods implementation to make the
service stateful.

Now instantiating a LightService requires that a list of HwLights is
provided, so a default implementation was provided as a convenience. The
android.hardware.light rust API version had to be bumped since we rely
on new derive statements added to the AIDL files.

Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
Change-Id: Id2b17a6a2290295c7b0b5405ac9815eaa28303c6
2023-06-29 10:54:30 -07:00
Jesus Sanchez-Palencia
ea05baf338 lights aidl: Add required @Rust derive statements
The new LightsService example is written in Rust and is being expanded
to include a state as part of the service. This required that HwLight
and HwLightState derived from the Copy and Clone traits, so here we are
updating the AIDL Rust bindings.

This is not an API change, so in order to avoid having to bump the AIDL
API version for this HAL we used the hash_gen.sh script as below:

$ m android.hardware.light-update-api
$ m android.hardware.light-freeze-api

$ vim light/aidl/Android.bp # removed frozen_api argument and the newly
created version 3 block

$ cp -r aidl_api/android.hardware.light/3/* aidl_api/android.hardware.light/2/
$ rm -rf aidl_api/android.hardware.light/3/

$ ./system/tools/aidl/build/hash_gen.sh  \
      hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/  \
      1  \
      hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/.hash

Tested: Verified that the build is passing and used with the next CL.
Bug: 286106270
Change-Id: I1400ec1db1e75595176a5656d6688df9457153d4
2023-06-29 10:53:23 -07:00
Treehugger Robot
2e46e91864 Merge "Validating key characteristics of generated/imported keys." 2023-06-29 17:34:26 +00:00
Jesus Sanchez-Palencia
531b5ba10b lights: Re-write example service in Rust
Add a re-implementation of the Lights HAL example service in Rust. This
was originally written as the start of a Cuttlefish specific
implementation of this service, but it's simple / small enough that
replacing the current Android C++ one with it shouldn't bring in any
trouble while providing yet another Rust service example to the tree.

Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a796fb113c405838424e61fd0b4cd6e0ef86c5a7)

Change-Id: I01eaf9ce7c6086e1429f52ff4f7f92cebc5360b6
2023-06-29 10:16:04 -07:00
Eran Messeri
4a7c3810fc Merge "Update default KeyMint version to 3" 2023-06-29 16:37:48 +00:00
Myles Watson
0e55fec5c3 Merge "Fix bluetooth AIDL restart fail when open HCI Fail" 2023-06-29 13:55:26 +00:00
Jesus Sanchez-Palencia
3004ccf550 Merge "lights: Add Rust backend to the lights AIDL" 2023-06-28 22:38:47 +00:00
Jin Chen
cb3c1de918 [uwb](hal) Add radar support
* Adding radar session type, capabilities, oids, and app configs based
  on the Android UWB radar UCI spec v1.0.

Test: Compile
Bug: 237097302
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:db326d178686dd981dbb81804534b51502392ae2)
Merged-In: Ia0b901859b38127db8532118f2427338fdf502a8
Change-Id: Ia0b901859b38127db8532118f2427338fdf502a8
2023-06-28 21:11:53 +00:00
yanggang.yang
6ebe251322 Fix bluetooth AIDL restart fail when open HCI Fail
[Description]
If aidl open HCI fail at the first time, the aidl state
can not change to enable for the next time to initialize.

[Root Cause]
Bluetooth AIDL State is always equal to INITIALIZING after
open hci fail at the first time.

[Solution]
When open HCI fail at the first time, initialize the mstate to ready

Bug: 285517442
Test: pass

Change-Id: I19756d6602ba931242d0f95942db55c505a210bb
2023-06-28 09:13:57 +00:00
Jaideep Sharma
cba428627a vts: Don't excercise data path for offloaded/bypass effects
Incase of offload effects or effects running in bypass mode
data is not handled by effect module, in those cases skip the
testcases to excercise data path.

Bug: 287590880
Test: run vts -m VtsHalAudioEffectTargetTest

Change-Id: I76155f8997b415bc96242f995ccc2e33c8989dc5
2023-06-28 04:47:30 +00:00
mike liao
b79cbf50f1 Add fix vts fail when configureMonitorEvent
[Description]
VTS StartFilterInDemux failed when configureMonitorEvent is called

[Root Cause]
Scrambling status event is not notified when configureMonitorEvent is called
  so test case failed.

[Solution]
Scrambling status event is not notified because of no input data.
Add input setting and check event notified or not after data is input.

Test: Manual
bug: 288193021

Change-Id: If5875d064fd67b72f8299205a5e35b1a2bd61934
2023-06-27 11:25:43 -07:00
Mikhail Naganov
9d16a6ac10 audio: Allow Module subclasses to customize stream creation
Since specializations of the 'Module' class likely need
to provide their own specializations for streams, provide
virtual methods for them.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iddb1bff9f11bc867aba61897ea2f8b9bc3c27544
2023-06-26 17:32:01 -07:00
Mikhail Naganov
d5554cfae2 audio: Refactor streams implementation
Simplify the experience of implementing stream variants.
Stream class now exposes two interfaces: DriverInterface
and StreamCommonInterface, which represent the two
aspects of its usage: via the FMQ on the worker thread,
and via IStreamCommon Binder interface.

Input/output streams now inherit the concrete stream
variant, and implement interface methods specific for
IStreamIn and IStreamOut.

Added DriverInterface::shutdown method which is called
on the worker thread prior to the exit.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5bf8da2f22b27f0e284a41fc30b920d87ac2936c
2023-06-26 17:32:01 -07:00
Mikhail Naganov
75b59dfb4e audio: Propagate errors from Driver::setConnectedDevices
Plumb propagation of errors reported by the implementations
of DriverInterface::setConnectedDevices up to the Module.
This allows returning the reported errors from the corresponding
IModule interface methods. Implement handling of errors
from connection state update by the Module implementation.

When updating streams about the connection status
ensure that the list of connected devices is not empty.

Also, add an extra check to AudioStreamIn#ActiveMicrophones
to validate the size of the returned active microphones
list.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I62a422d95c37a672fce4ad221bea435cc7b4ebfa
2023-06-26 17:32:01 -07:00
Mikhail Naganov
26dc9add8d audio: Enable use of 'expected_utils' for ScopedAStatus
Add necessary helper functions and use
RETURN_STATUS_IF_ERROR where possible.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If68c995da0e5e0cb2e9c142ba40af6503ff628b2
2023-06-26 17:32:01 -07:00
Mikhail Naganov
b42a69ef68 audio: Pass flags and I/O handle to StreamContext
Vendor implementations may need to see the value of flags
and the I/O handle of the mix port used to open the stream.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If1f346793f3b3a725bc19358909f5b461cb159c1
2023-06-26 17:32:01 -07:00
Mikhail Naganov
57f0dcf78d audio: Facilitate extension of Module class by vendors
Make interface methods protected so that subclasses can
augment them.

Provide getters for private fields.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
2023-06-26 17:32:01 -07:00
Xin Li
377be1fa1b Merge "Merge Android 13 QPR3" 2023-06-26 22:29:51 +00:00
Jesus Sanchez-Palencia
b990a93646 lights: Add Rust backend to the lights AIDL
This enables us to write a lights service in Rust.

Bug: 286106270
Tested: Verified with a WIP replacement for the Lights example service.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a37bed645683cec20b67b8303aa8e3f6ac08f32a)
Change-Id: I6f9838ea711fb194ac9b9f7b3c29eeb87491beb8
2023-06-26 13:48:50 -07:00
Rajesh Nyamagoud
7b9ae3c485 Validating key characteristics of generated/imported keys.
Updated VTS tests to verify mgf-digests in key characteristics of
RSA-OAEP keys. Added new tests to import RSA-OAEP keys with
mgf-digests and verified imported key characteristics.

Bug: 279721313
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I06474a85c9e77fded264031ff5636f2c35bee6b4
2023-06-26 18:40:53 +00:00
Treehugger Robot
efb4b9397a Merge "Check for MGF1 digests in key characteristics." 2023-06-26 17:22:09 +00:00
Deyao Ren
ed0da8c243 Merge changes from topic "cherry-pick-b210883464"
* changes:
  Fixes sensors AIDL default impl APEX's binary name.
  Cuttlefish sensors apex uses aidl implementation
2023-06-26 16:55:03 +00:00
Zhanglong Xia
5c027015c3 add fuzz test and fix the Thread network HAL compile errors
Bug: 288825495
Test: Build and run fuzz test in cuttlefish

Change-Id: If14bd95657d6a71737a348ccbc6d1b05bbcc1f4c
2023-06-26 17:55:39 +08:00
Shunkai Yao
e0ade8fe67 Merge "Format VTS test code" 2023-06-23 17:19:15 +00:00
Austin Foxley
de20b45a51 Merge "contexthub: Enable rust bindings" 2023-06-23 15:00:35 +00:00
Shunkai Yao
9e60e635bf Format VTS test code
Bug: 287430121
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Iecc0c9388c6596cf5a25918f8f0af0495b2133a6
2023-06-23 04:34:50 +00:00
Shunkai Yao
187b6b7ece Merge "aidl: Improve Effect VTS naming" 2023-06-23 04:01:02 +00:00
Daniel Norman
d20ebb4f6f Fixes sensors AIDL default impl APEX's binary name.
commit bde01c60fa
moved this APEX from the HIDL to AIDL impl, but accidentally
left out the rename of the binary in the file_contexts

Also deletes unused .rc file here; the APEX already reuses the
.rc file from outside the APEX dir.

Bug: 222579208
Test: Build cf_x86_64_phone using sensors APEX: http://ab/P33964358
      Boot the device, use accel sensor to rotate the screen.
Change-Id: Ib107770312bb80b67364c855efd2df3a9bc52b9a
(cherry picked from commit 80e55dabf3)
2023-06-22 18:36:36 +00:00
deyaoren@google.com
1e1887e055 Cuttlefish sensors apex uses aidl implementation
Bug: 210883464
Test: atest hal_implementation VtsAidlHalSensorsTargetTest
Tests run on abtd:
https://android-build.googleplex.com/builds/abtd/run/L63300000953949688
https://android-build.googleplex.com/builds/abtd/run/L18600000953935211
One test is failing on tip of tree

(cherry picked from commit bde01c60fa)
Change-Id: Iec27e916c94e5a327fc6c4d87451e055b14d9660
2023-06-22 18:21:43 +00:00
David Drysdale
1d7447e5d3 Merge "Allow extra error code in device ID attestation" 2023-06-22 05:58:57 +00:00
Xin Li
6c136ebd48 Merge Android 13 QPR3
Bug: 275386652
Merged-In: I054707abb86a406dfb3ce4f211338107da0a6582
Change-Id: I53d29d621a262cd96d4768850425ca04202644c7
2023-06-21 15:16:02 -07:00
Eran Messeri
8417708fe4 Update default KeyMint version to 3
Update the default KeyMint version to v3.
Note this affects the pure software implementation of KeyMint that is
not used for anything that tests currently run against.

Bug: 275982952
Test: m (that it builds)
Change-Id: I6ab10329af590bd2a045710dfff47c6e78740464
2023-06-21 16:11:25 +01:00
Dan Shi
8cf1bf3f00 Merge "Test: Don't check results when no type-c ports" am: 7e9eece7b3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2583450

Change-Id: I054707abb86a406dfb3ce4f211338107da0a6582
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 05:46:30 +00:00