Commit Graph

47230 Commits

Author SHA1 Message Date
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
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
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
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
Dan Shi
7e9eece7b3 Merge "Test: Don't check results when no type-c ports" 2023-06-21 04:56:08 +00:00
Jaideep Sharma
e4c7a96789 aidl: Improve Effect VTS naming
Use uuid in hexadecimal format in testcase name.

Change-Id: Ib687b6617060e4400a767f23ca0b26cece4005f1
2023-06-16 05:58:43 +00:00
Changyeon Jo
b484054880 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6 am: 4bf0cb2c5f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I74e22a7195fb761c3920b7fd865b000d0a4d3ee7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 01:16:37 +00:00
Changyeon Jo
4bf0cb2c5f Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I8ac30fb5abe6c6205d099d089e769ffb477ddc7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 00:32:36 +00:00
Changyeon Jo
55baee93d6 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: Ic0db29743b092a5a2d01860e76356a38e3e4788b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 00:04:30 +00:00
Changyeon Jo
c070b5a14b Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: Ibcaac170949c319d2cff5b45bc8114238d0ada7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 23:21:50 +00:00
Changyeon Jo
a343d0cf0c Increase frame counters in the same critical section am: 928a4535c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I8a59e6173179a284bb90960b30e2e5a35de075a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 22:39:21 +00:00
Changyeon Jo
928a4535c8 Increase frame counters in the same critical section
Bug: 275049370
Test: atest VtsHalEvsV1_0TargetTest
Change-Id: I814aac4edec142027d3802f5ee0d7a444ae2ee86
2023-06-15 21:11:09 +00:00
David Drysdale
f42238c99f Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
2023-06-15 09:43:18 +01:00
Treehugger Robot
8426045977 Merge "Support to get EC public key from the UdsCertchain." am: 1acca5c139
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615472

Change-Id: I44cd75a17975c7f8e4ab70fc4aa4c0ed3e46e9b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 18:10:22 +00:00
Treehugger Robot
1acca5c139 Merge "Support to get EC public key from the UdsCertchain." 2023-06-14 17:38:22 +00:00
Treehugger Robot
5721b05a66 Merge "Keymaster VTS: add TEST_MAPPING" am: fce05decfc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2603747

Change-Id: I3d0d3c30531247f4683b827c2f8c418a042ad576
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-12 17:45:22 +00:00
Subrahmanyaman
a18883a58c Support to get EC public key from the UdsCertchain.
Bug: 285896470
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I7f829b1346feeab0fd429ad7b9714181b6668b34
2023-06-12 17:29:38 +00:00
Treehugger Robot
fce05decfc Merge "Keymaster VTS: add TEST_MAPPING" 2023-06-12 16:57:08 +00:00
Treehugger Robot
a2147b121e Merge "media.c2 aidl: Add decoder output allocator interface" am: 3c4de3af67
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2613750

Change-Id: I1b7ef4a4326f7838fef7b0d0ac5fbf163c209714
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 17:47:10 +00:00
Treehugger Robot
3c4de3af67 Merge "media.c2 aidl: Add decoder output allocator interface" 2023-06-09 17:11:01 +00:00
Avichal Rakesh
e1390f059f camera: Fix prefix length path for External Camera HAL am: b8863f6a03
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2386907

Change-Id: I1ccf1ab9bc2520801b55741219def26675f381fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 01:31:57 +00:00
Avichal Rakesh
b8863f6a03 camera: Fix prefix length path for External Camera HAL
The default External Camera HAL accidentally used `sizeof` on a `char *`
to get the length of the string. This "worked" because the string in
question "/dev/" has length of 5, while on a 32-bit system `char *`
has a size of 4. This difference of 1 was handled a few lines later.

However on 64-bit system `sizeof(char *)` returns 8 which breaks the
logic later in code.

As `sizeof` was being used as a proxy for strlen, this CL converts the
uses C++'s std::char_traits::length to determine the string lengths
at compile time.

Bug: 265168485
Test: Manually tested that the calculated length is correct after the
      fix.
Change-Id: I92481a2bcb74fdbbb483ef552168debf07b2d68a
2023-06-08 17:00:35 -07:00
Wonsik Kim
75979829db Merge "android.hardware.media.c2: sync with internal" am: 9efd5025fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2613749

Change-Id: I53fece7c876217523cb7aba9760b0ffaa99836d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 16:34:12 +00:00
Wonsik Kim
9efd5025fc Merge "android.hardware.media.c2: sync with internal" 2023-06-08 15:58:58 +00:00
David Drysdale
15bc932a09 Merge "Use RAII to ensure KeyMint keyblobs deleted" am: 462eccaa3b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2617612

Change-Id: I377bb0c5476549e2463a28db257507b6605b8993
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 10:37:06 +00:00
David Drysdale
462eccaa3b Merge "Use RAII to ensure KeyMint keyblobs deleted" 2023-06-08 09:55:14 +00:00
Kangping Dong
2403565ce0 Merge "add OWNERS file for the threadnetwork HAL project" am: 68c5b2b40a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2605906

Change-Id: I7b9677368e9e469407d5f0bf13323add366e61fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 03:23:12 +00:00
Kangping Dong
68c5b2b40a Merge "add OWNERS file for the threadnetwork HAL project" 2023-06-08 02:51:28 +00:00
Treehugger Robot
b6f7880bad Merge "Mark media.bufferpool2 and media.c2 as double-loadable" am: d62508c79e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2611868

Change-Id: I29b3dc7401f942785ad7225afa85dd1f81ef25bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 21:38:19 +00:00
Treehugger Robot
d62508c79e Merge "Mark media.bufferpool2 and media.c2 as double-loadable" 2023-06-07 20:39:19 +00:00
Steven Moreland
7967c1a9e4 Merge "Camera Provider VTS: auto-gen" am: 433f0ac41d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2611867

Change-Id: I7de9f8d7e42a242ad88d72d55aa56a55e05d3951
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 17:59:54 +00:00
Steven Moreland
433f0ac41d Merge "Camera Provider VTS: auto-gen" 2023-06-07 17:23:25 +00:00
Gabriel Biren
630277445d Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." am: b354c89236
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615811

Change-Id: Iaacfb42719636e18465310269887c5cd69a6f8b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 16:35:16 +00:00
Gabriel Biren
b354c89236 Merge "Add a new utility class wifi_hidl_test_utils_1_6 for the Wifi VTS tests." 2023-06-07 15:49:51 +00:00
David Drysdale
1b9febc5ca Use RAII to ensure KeyMint keyblobs deleted
If some check in a VTS test case fails, the test function may exit early
and not call CheckedDeleteKey(&some_keyblob), thus "leaking" a key blob.

This isn't normally an issue, but if the key blob happens to use a
feature that uses some secure storage (e.g. ROLLBACK_RESISTANCE or
USAGE_COUNT_LIMIT=1) then this may leak some scarse resource.

To avoid the chance of this, use an RAII holder to ensure that
manually-managed keyblobs (i.e. key blobs that are not held in the
key_blob_ member of the base test class) are always deleted.

Bug: 262212842
Test: VtsAidlKeyMintTargetTest
Change-Id: Ie8806095e249870484b9875eb660070607f339a3
2023-06-07 15:46:42 +01:00
Haotien Hsu
392d530a64 Test: Don't check results when no type-c ports
For those devices without type-c ports, the queryPortStatus test is
always failed.Because there are no PortStatus for the callbacks.
Adding an additional condition branch to skip the results checking when
there are no PortStatus.

Bug: 281643316
(https://partnerissuetracker.corp.google.com/issues/281643316)
Change-Id: Ibf599038b542d5d81a2af9ab2097f2f868be0447
Signed-off-by: Haotien Hsu <haotienh@nvidia.com>
2023-06-07 13:46:58 +08:00
Gabriel Biren
a2482fde1a Add a new utility class wifi_hidl_test_utils_1_6
for the Wifi VTS tests.

Main method is getBridgedWifiApIface_1_6, which
allows us to configure the chip based on the
Bridged AP IfaceConcurrencyType, rather than
the AP IfaceType like in getBridgedWifiApIface_1_5.

Implementations were largely copied from
wifi_hidl_test_utils and wifi_hidl_test_utils_1_5.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
       # tested on a Bluejay device that supports
       # the AddAccessPointWithDualBandConfig test
Change-Id: I2571876149fc14c8de02e1cec9934dd052cada5c
Merged-In: I2571876149fc14c8de02e1cec9934dd052cada5c
2023-06-06 22:08:48 +00:00
Yu Liu
5a04a3a70b Merge "Remove duplcated static libgtest" am: b06d1aeb9f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615812

Change-Id: I538a986eb0962328a851c79ac9b7f483d39078a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 19:07:38 +00:00