Commit graph

26877 commits

Author SHA1 Message Date
Jakub Pawlowski
db779b41a3 Bluetooth HAL: fix ISO handling for H4 protocol
Bug: 150670922
Test: run H4ProtocolTest.TestReads
Change-Id: Ib051550da1c99a3b682d149cd6c88cce294dbc9c
2020-11-23 17:43:09 +01:00
Fenglin Wu
15b01dc53b vibrator: vts: correct the checking flag when testing on() interfaces
Check CAP_ON_CALLBACK flag when testing vibrator onWithCallback() and
OnCallbackNotSupported() functions.

Bug: 172485963
Change-Id: Ie5c926ec943f191d1e5309ac85e7c8e1540fb824
2020-11-23 10:37:45 +08:00
Treehugger Robot
2c33220ae7 Merge "HAL changes for ThermalMitigation API." am: 6be52d5b34
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1507840

Change-Id: I3f5f6306ce3ad7d6960f7f2d9a2702041d568dbd
2020-11-21 02:35:26 +00:00
Treehugger Robot
6be52d5b34 Merge "HAL changes for ThermalMitigation API." 2020-11-21 02:02:39 +00:00
Treehugger Robot
99fde2e9f8 Merge "identity: Change Identitial Credential to pass in subject by attestation params instead of making another function in attestation_utils." am: 4b0d04d39a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1506562

Change-Id: I709d838d77322ef596241758008ee6eed7dfd075
2020-11-21 01:27:44 +00:00
Mikhail Naganov
94ab03a3a2 Remove PREUPLOAD.cfg from audio HAL example
As suggested by the comment on ag/12691153

Bug: 142480271
Test: N/A
Change-Id: Ic9e2b986d3f9734dd884a2c88ca86d251147126b
Merged-In: Ic9e2b986d3f9734dd884a2c88ca86d251147126b
2020-11-21 01:16:10 +00:00
Mikhail Naganov
d72a7c27ab audio: Implement VTS tests for V7.0
The major change in V7.0 is use of enum values defined
in the Audio Policy Configuration XSD schema. This allows
decoupling types used at the HIDL layer from system/audio.h.
Added a header audio_policy_configuration_V7_0-enums.h
with utility functions analogous to ones from system/audio.h
but defined for the types generated from XSD schema.

Since the code of VTS tests is shared between versions,
ensured that the VTS tests for the previous HAL versions
didn't regress.

Bug: 142480271
Test: atest VtsHalAudioV6_0TargetTest
      atest VtsHalAudioEffectV6_0TargetTest
      atest VtsHalAudioV7_0TargetTest
      atest VtsHalAudioEffectV7_0TargetTest
Change-Id: Ia7c2d49a02783725080c8fed6a25853e91bba487
Merged-In: Ia7c2d49a02783725080c8fed6a25853e91bba487
2020-11-21 01:15:53 +00:00
Mikhail Naganov
baf57fb136 audio: Add example HAL implementation
This is partial implementation of the example V7.0 audio HAL
which passes VTS tests. Note that the 'core' part
of the HAL (IDevice/IStream) isn't implemented yet.
It passes VTS because it doesn't provide any devices
(modules) and the audio HAL isn't the 'default' instance.

Bug: 142480271
Test: atest VtsHalAudioV7_0TargetTest
      atest VtsHalAudioEffectV7_0TargetTest
Change-Id: Ie3dd62c5db1cdb5534df4dd7f326c4c8776bf3c4
Merged-In: Ie3dd62c5db1cdb5534df4dd7f326c4c8776bf3c4
2020-11-21 01:15:39 +00:00
Mikhail Naganov
1074c22fe1 audio: Reformat README as Markdown
Rename README -> README.md, reformat it as Markdown.
Provide missing descriptions for some directories.

Bug: 142480271
Test: N/A
Change-Id: Ic6f60a21def4bf210a7e1446454d709f68a13422
Merged-In: Ic6f60a21def4bf210a7e1446454d709f68a13422
2020-11-21 01:15:19 +00:00
Mikhail Naganov
355dd0630c audio: HAL V7 tweaks
- rename AudioBasicConfig -> AudioConfigBase to better
  match a similar structure in audio.h;

- define AudioProfile structure for defining an I/O profile;

- use AudioProfile to replace IStream.getSupported* methods
  with a single IStream.getSupportedProfiles method;

- define AudioDevice type for convenience and clarity;

- move enums definition for AudioInputFlags and AudioOutputFlags
  into XSD. This allows parsing APM config w/o depending on
  the framework code.

Bug: 142480271
Test: m
Change-Id: I1951b2de383751fe53b96954dfd02cdd1ab6cc8f
Merged-In: I1951b2de383751fe53b96954dfd02cdd1ab6cc8f
2020-11-21 01:15:03 +00:00
Treehugger Robot
4b0d04d39a Merge "identity: Change Identitial Credential to pass in subject by attestation params instead of making another function in attestation_utils." 2020-11-21 01:05:29 +00:00
Jack Nudelman
5cd9414268 HAL changes for ThermalMitigation API.
go/telephony-thermal-mitigation

Bug: 158872959
Test: make, vts

Change-Id: I914993a6e80305732564e0507ca6a74b1c296439
Merged-In: I914993a6e80305732564e0507ca6a74b1c296439
2020-11-21 00:49:48 +00:00
Daniel Bright
264e65b092 Merge "Added pdu session id to setupDataCall" am: 78293592cc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1507689

Change-Id: Ib1149a049adcafcd4dc45a486ea1b16248ac9a0e
2020-11-20 23:26:10 +00:00
Daniel Bright
78293592cc Merge "Added pdu session id to setupDataCall" 2020-11-20 22:54:24 +00:00
Steven Moreland
28f2549765 HIDL HALs mark sensitive data
For extra precautious transaction clearing.

Bug: 171501998
Test: hidl_test + inspecting output
Change-Id: I813dc3dd6c85ad0e86c6b8c116b7a207517dd12e
2020-11-20 21:16:16 +00:00
Treehugger Robot
81f6751d1b Merge "Audio: Rearrange types in V7" am: c563bfc08e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1506778

Change-Id: I4f141f2ef831b27a165dbb3f08684732485c6661
2020-11-20 20:22:30 +00:00
Daniel Bright
3c72fbafce Added pdu session id to setupDataCall
The pdu session id needs to be passed to setup data call on handover

(clean cherry-pick)

Test: Tested that handover still worked with logs.  IWlan -> Cell + Cell -> IWlan
Bug: 161572859
Merged-In: I0e11c8997674cdaad4bb82491d818ca85ee197d1
Change-Id: I0e11c8997674cdaad4bb82491d818ca85ee197d1
2020-11-20 12:22:08 -08:00
Treehugger Robot
c563bfc08e Merge "Audio: Rearrange types in V7" 2020-11-20 19:39:55 +00:00
Daniel Bright
30636cbc1a Merge "Added global retry support" am: 39c8747585
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1504811

Change-Id: If2e338d8e8d9a9a288030b853c573fdc0689b52f
2020-11-20 19:12:31 +00:00
Daniel Bright
39c8747585 Merge "Added global retry support" 2020-11-20 18:48:35 +00:00
Selene Huang
06614b3e15 identity: Change Identitial Credential to pass in subject by
attestation params instead of making another function in attestation_utils.

Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Change-Id: I67f5f584875a1baefc5a3d1a1fc46d605febbf33
2020-11-20 08:41:34 -08:00
Slava Shklyaev
19d48e79f2 Replace nn::NativeHandle with nn::SharedHandle am: 49817a0e0f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1484123

Change-Id: Iaa605559f5045aca4bb088ad8a2b25552a088a28
2020-11-20 16:38:27 +00:00
Slava Shklyaev
49817a0e0f Replace nn::NativeHandle with nn::SharedHandle
Bug: 160669116
Test: mma
Change-Id: I73b2b93aab6cbf37d3c145e15ee9ae45228954f1
Merged-In: I73b2b93aab6cbf37d3c145e15ee9ae45228954f1
(cherry picked from commit d4290b8bf8)
2020-11-20 13:55:05 +00:00
Grzegorz Kołodziejczyk
d06c0fc642 Copy audioConfig according to config discriminator am: d7f04f9f06
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497981

Change-Id: I969536e3efed093eb2a7bd7ee833400464b9d306
2020-11-20 09:10:37 +00:00
Grzegorz Kołodziejczyk
a0d85769f2 Check if no queue is set in negative config cases am: 7fa9659923
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1503733

Change-Id: I5e6f8543b462935fe665ea6c5f44d91d67912f32
2020-11-20 09:10:33 +00:00
Grzegorz Kołodziejczyk
7140d6708a Reset data queue pointer in negative config cases am: e01b0f7c5a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1503732

Change-Id: I288c51bf44d2c5d7f789b46785e82ff90ec8bd26
2020-11-20 09:09:53 +00:00
Mikhail Naganov
fda20429b4 Audio: Rearrange types in V7
Update channel mask and SR lists to conform to XSD.
Added a script for converting existing APM XML files.

Bug: 142480271
Test: m
Change-Id: I986b9bccdade5fa850b06b033143388715a656af
Merged-In: I986b9bccdade5fa850b06b033143388715a656af
2020-11-20 01:41:38 +00:00
Grzegorz Kołodziejczyk
d7f04f9f06 Copy audioConfig according to config discriminator
Audio configuration as safe union is guarded to not violate its discriminator
usage. Only one member can be set.

Change-Id: I98a94d81ea5bacca2407286746432b972aac4488
2020-11-19 22:51:42 +00:00
Grzegorz Kołodziejczyk
7fa9659923 Check if no queue is set in negative config cases
Data queue pointer should be checked if it's nullptr if codec
configuration is invalid. This covers more code in case of invalid pcm
configuration.

Tag: #stability
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Bug: 173353147
Change-Id: Ib78f1615e7a15603dc6d73188edf1df7eab12b8b
2020-11-19 22:51:35 +00:00
Grzegorz Kołodziejczyk
e01b0f7c5a Reset data queue pointer in negative config cases
Data queue should be set to nullptr if pcm configuration is invalid.
Otherwise previously set queue would be cosidered during check.

Tag: #stability
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Fixes: 173353147
Bug: 173353147
Change-Id: I10ee061e1c75f73410a9d0a0b1eaace0e536addd
2020-11-19 22:51:29 +00:00
Steven Moreland
312bf0e65e HIDL: IFoo mark @SensitiveData
Marking this annotation for use in hidl_test, so that we make sure to
exercise it.

Bug: 171501998
Test: hidl_test
Change-Id: Ia40e5fdf26804773c1450d181723cc7b97bf6a81
2020-11-19 22:27:27 +00:00
Treehugger Robot
e727d997b6 Merge "identity: Fix attestation and documentation problems." am: d47c62b62a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1475343

Change-Id: I94a44ba671fd41c1cdfce92cbf7541d2faf87ea1
2020-11-19 16:27:39 +00:00
Treehugger Robot
d47c62b62a Merge "identity: Fix attestation and documentation problems." 2020-11-19 15:52:21 +00:00
Marin Shalamanov
281a5870d0 Merge "Clarify the ComposerClient comment for CONFIG_GROUP" am: f344363e64
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497983

Change-Id: I5bb5459c4ef9e634c58a42c86447316a9532afe1
2020-11-19 13:47:48 +00:00
Marin Shalamanov
f344363e64 Merge "Clarify the ComposerClient comment for CONFIG_GROUP" 2020-11-19 13:27:53 +00:00
Marin Shalamanov
37c5495c52 Clarify the ComposerClient comment for CONFIG_GROUP
Clarify that configs with the same group should differ only
by refresh rate.

Test: n/a
Merged-In: I2b09689825fc9564665324ff18eb1907765b9016
Change-Id: I2b09689825fc9564665324ff18eb1907765b9016
2020-11-19 10:49:53 +00:00
Jack Yu
78843c1e4f Added global retry support
The retry timer suggested by the network will persist
accross network requests. Also changed the retry timer
to a 64-bit value to be consistent with types used in
Android time APIs.

(clean cherry-pick)

Test: FrameworksTelephonytests
Fix: 159672248
Merged-In: I763afdf34378512c60c0838830cb84875b1c66f0
Change-Id: I763afdf34378512c60c0838830cb84875b1c66f0
2020-11-18 21:32:22 -08:00
Karthik Bharadwaj
6e8d750aa3 Merge "Strip hinge angle sensor when running a 2.1 HAL as 2.0" am: d3e3b877ac
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1498362

Change-Id: I3e2781b95dfe0ca601c0f6fc02ec0eca9c9a56fb
2020-11-17 20:06:24 +00:00
Karthik Bharadwaj
d3e3b877ac Merge "Strip hinge angle sensor when running a 2.1 HAL as 2.0" 2020-11-17 19:28:36 +00:00
David Zeuthen
34abaaefcb identity: Fix attestation and documentation problems.
- The docs said that IdentityCredential.createEphemeralKey() returned
  data encoded PKCS#8 which is wrong. It's supposed to be in DER format
  which is also what the VTS tests and credstore expects.

- Clarify that createEphemeralKeyPair(), setReaderEphemeralPublicKey(),
  and createAuthChallenge() are all optional.

- Avoid passing an invalid profile ID in the IdentityCredentialTests.
  verifyOneProfileAndEntryPass test.

- Update requirements for which tags must be present in the attestation
  for CredentialKey as well as the requirements on expiration date and
  the issuer name.  Update default implementation to satisfy these
  requirements. Update VTS tests to carefully verify these requrements
  are met.

- Clarify requirements for X.509 cert for AuthenticationKey. Add VTS
  test to verify.

- Mandate that TAG_IDENTITY_CREDENTIAL_KEY must not be set for test
  credentials. Add VTS test to verify this.

- Make default implementation pretend to be implemented in a trusted
  environment and streamline VTS tests to not special-case for the
  default implementation.

- Switch to using the attestation extension parser from the KM 4.1
  support library instead of the one from system/keymaster. The latter
  one did not support the latest attestation extension and thus would
  fail for pretty much anything that wasn't the default HAL impl.

- Fix a couple of bugs in keymaster::V4_1::parse_attestation_record():
  - Report root_of_trust.security_level
  - Add support for Tag::IDENTITY_CREDENTIAL_KEY

- Fix how EMacKey is calculated.

- Add test vectors to verify how EMacKey and DeviceMac is calculated.

Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Bug: 171745570
Change-Id: I2f8bd772de078556733f769cec2021918d1d7de6
2020-11-17 13:44:00 -05:00
Treehugger Robot
ce18601982 Merge "Implement keymint V1 aidl interfaces, service module, and vts tests." am: 0ab081bfa6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1298415

Change-Id: I6649cf14198d4f2ca23ef2d00f94698e4023f281
2020-11-17 16:55:17 +00:00
Treehugger Robot
0ab081bfa6 Merge "Implement keymint V1 aidl interfaces, service module, and vts tests." 2020-11-17 16:13:50 +00:00
Junyu Lai
589ee9d105 Merge "Refactor 1.0 TetheroffloadControl VTS" am: 628db71ca0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1481236

Change-Id: I602daa593f6efdd902df31c4163f1cfdf7b8ef96
2020-11-17 09:56:24 +00:00
Junyu Lai
628db71ca0 Merge "Refactor 1.0 TetheroffloadControl VTS" 2020-11-17 09:40:05 +00:00
Selene Huang
31ab404a5e Implement keymint V1 aidl interfaces, service module, and vts tests.
Bug: b/160968242
Test: atest VtsHalKeyMintV1_0TargetTest

Change-Id: I5f9d642f96e262dd567d88f4d582e621d168dceb
2020-11-17 01:11:42 -08:00
Michael Butler
e91a56a78f Implement NNAPI canonical interfaces am: 4b276a767b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1501391

Change-Id: Ia189937db1aa88c591bd0b44465c3c9816e80d82
2020-11-17 02:04:19 +00:00
Michael Butler
4b276a767b Implement NNAPI canonical interfaces
This CL implements the canonical IDevice, IPreparedModel, and IBuffer
interfaces for the 1.0, 1.1, 1.2, and 1.3 NN HIDL HAL interfaces.
Further, it introduces "Resilient" adapter interfaces to automatically
retrieve a handle to a recovered interface object after it has died and
rebooted.

This CL also updates the conversion code from returning nn::Result to
nn::GeneralResult, which includes a ErrorStatus code in the case of an
error.

Finally, this CL introduces a new static library
neuralnetworks_utils_hal_service which consists of a single function
::android::nn::hal::getDevices which can be used by the NNAPI runtime to
retrieve the HIDL services without knowing the underlying HIDL types.

Bug: 160668438
Test: mma
Test: NeuralNetworksTest_static
Change-Id: Iec6ae739df196b4034ffb35ea76781fd541ffec3
Merged-In: Iec6ae739df196b4034ffb35ea76781fd541ffec3
(cherry picked from commit 3670c385c4)
2020-11-16 14:29:55 -08:00
karthik bharadwaj
c8fd7b31e0 Strip hinge angle sensor when running a 2.1 HAL as 2.0
VTS ensures that  2.0 HALs don't expose the hinge angle sensor,
but the 2.1 HALs must run 2.0 VTS tests. This CL ensures that
we don't expose the hinge angle sensor on the 2.0 HAL, to avoid
failing those VTS tests.

Bug: 173135479
Test: run vts -a x86 -m VtsHalSensorsV2_0TargetTest
Change-Id: I944bfb0b01be0831e45cfd3d6ed7dab6770d1b80
2020-11-16 05:21:25 +00:00
Treehugger Robot
c9f4cc376d Merge "supplicant(vts): Skip p2p tests on non-p2p devices as intended" am: f19e282226
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497700

Change-Id: I694d4cd21dcfd79ea5fdc1993efb7df59178c03c
2020-11-14 06:44:04 +00:00
Treehugger Robot
f19e282226 Merge "supplicant(vts): Skip p2p tests on non-p2p devices as intended" 2020-11-14 06:14:29 +00:00