Commit Graph

47240 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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