Commit graph

33592 commits

Author SHA1 Message Date
Treehugger Robot
9fec2f0104 Merge "Bluetooth HAL: Add missing retry logic to the H4Protocol::Send()" 2021-10-27 19:53:09 +00:00
Sooraj Sasindran
bb347323d0 Merge "NITZ API improvement" 2021-10-27 19:49:15 +00:00
Sukesh Srikakula
1e2b234392 Bluetooth HAL: Add missing retry logic to the H4Protocol::Send()
As part of an optimization, H4Protocol::Send() is modified to
use writev() instead of WriteSafely(), which has a retry logic
to send remaining bytes if the underlying write() call couldn't
transfer all the bytes in a single system call. This cl is now
adding this missing retry logic to this function.

Bug: 198992020
Test: H4 UTTest, Bluetooth functional test.

Change-Id: I78fad886d52f0910c83b000d5768128f00d3ddbc
2021-10-27 11:21:38 -07:00
Ian Hua
ca46f9768c Add FL6 spec tests to AIDL VTS.
Also skip FL6 (AIDL_V2) tests for older AIDL drivers.

Bug: 203038813
Test: VtsHalNeuralnetworksTargetTest
Specifically, for old driver such as AIDL_V1 sample driver, it can pass
HIDL tests and skip AIDL_V2 tests. For new driver such as AIDL_V2
sample driver, it can pass all tests.

Change-Id: I689fef0945428f6548977628e3c43628dd1e5bf7
2021-10-27 11:55:25 +01:00
Michael Butler
5f14bad22c Merge changes Iae9f692f,Ib43f1cb6,I9d4f0c30,I7d06ea35
* changes:
  Move NN HandleError from utils/common to 1.0/utils
  Relocate NN ProtectCallback to 1.0/utils
  Move NN memory utils from utils/common to 1.0/utils
  Remove hal::utils::countNumberOfConsumers
2021-10-26 23:55:24 +00:00
Steven Moreland
713d22e0f1 Merge changes from topic "health-aidl"
* changes:
  health: Add to compatibility matrix.
  health: separate_platform_variant = false
  health: Convert of health HAL to AIDL
2021-10-26 22:33:31 +00:00
Michael Butler
49d95e0457 Move NN HandleError from utils/common to 1.0/utils
This change is part of a larger chain of changes to remove HIDL and AIDL
libraries from neuralnetworks_utils_hal_common.

Bug: N/A
Test: mma
Change-Id: Iae9f692ffc72700294aae694c256e75c7e353fef
2021-10-26 21:18:33 +00:00
Michael Butler
e8645c3b8d Relocate NN ProtectCallback to 1.0/utils
This change is part of a larger chain of changes to remove HIDL and AIDL
libraries from neuralnetworks_utils_hal_common.

Bug: N/A
Test: mma
Change-Id: Ib43f1cb683a09ae5c9116a6dea4d269c9c2c78b4
2021-10-26 21:18:09 +00:00
Michael Butler
15965821e8 Move NN memory utils from utils/common to 1.0/utils
This change is part of a larger chain of changes to remove HIDL and AIDL
libraries from neuralnetworks_utils_hal_common.

Bug: N/A
Test: mma
Change-Id: I9d4f0c30932fad7ccb6231aa03e57f7227af4880
2021-10-26 21:17:53 +00:00
Michael Butler
301ef060e9 Remove hal::utils::countNumberOfConsumers
This CL removes hal::utils::countNumberOfConsumers and uses the existing
nn::countNumberOfConsumers.

This change is part of a larger chain of changes to remove HIDL and AIDL
libraries from neuralnetworks_utils_hal_common.

Bug: N/A
Test: mma
Change-Id: I7d06ea355eae7aa80b94b09a23d606bbb2322120
2021-10-26 21:17:10 +00:00
Felipe Leme
8bfd990678 Merge "Parse user flags as flags instead of enum." 2021-10-26 19:40:00 +00:00
Yu Shan
68cb8c04e8 Parse user flags as flags instead of enum.
The flags field in UserInfo is a int32_t that contains multiple
UserFlags 'or'ed together. We should not parse it as enum.

Test: atest android.hardware.automotive.vehicle@2.0-utils-unit-tests
Bug: 202520478
Change-Id: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
Merged-In: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
(cherry picked from commit 5c0ec3f1de)
2021-10-26 19:39:48 +00:00
Yifan Hong
21a22cece4 health: Add to compatibility matrix.
For now, add as optional. Once we finished implementing
it on Android T devices, make it required.

Test: pass
Bug: 177269435
Change-Id: I148b7567d8e154cb5e16ec01b547785f90c7a706
2021-10-26 11:03:04 -07:00
Yifan Hong
b47f676008 health: separate_platform_variant = false
Disable the generation of ndk_platform variant during the
ndk_platform -> ndk migration.

Test: builds
Bug: 177269435
Change-Id: I467eaee53542b152df1d398a8f044eb42fd01772
2021-10-26 11:03:03 -07:00
Yifan Hong
52ecb3f421 health: Convert of health HAL to AIDL
On top of the hidl2aidl translation, the following is
done manually:

- Renamed the package from health2 to health. Also pulls in
health@1.0::Battery* enums.
- Removes Result and Constants enum. Result values are returned
as transaction status codes.
- Removes health@2.1 charger related APIs.
  - remove shouldKeepScreenOn
  - remove getHealthConfig
  - remove HealthConfig type
- Removes StorageAttribute because it is not used in the framework
- Add units to HealthInfo fields and IHealth methods.
- Update docs (namely, u -> µ in various places)

Bug: 177269435
Test: pass

Change-Id: I9c9a9d9dd5d49142258e608a463412d3e89e91a3
2021-10-26 11:03:03 -07:00
Tommy Chiu
abcf89dd53 libkeymint_support: Make it vendor accessiable
This support function is supposed to be useable by vendor in treble.
Add "vendor_available" to reflect that.

Bug: 203481954
Test: Link by vendor successfully
Change-Id: I9709ac0ab79405c336ed8a1bc44b2ef643dd5b2d
2021-10-26 23:25:42 +08:00
Aaron Tsai
5b5514b12d NITZ API improvement
- change the parameter description of "receivedTime"
 - add a parameter "ageMs" to represent the caching time in RIL and modem

Bug: 195418175
Test: build pass
Change-Id: I0fabbfabc18aa6acc0285527e254290d8291d9c8
2021-10-26 09:45:39 +00:00
Michael Butler
c42a934ea8 Revert "Provide explicitly versioned NNAPI AIDL utils libs -- HAL."
Revert "Use explicitly versioned NNAPI HAL util libs in darwinn2."

Revert "Add neuralnetworks_utils_hal_aidl_v2 to allowed_deps.txt"

Revert "Provide explicitly version NNAPI AIDL utils lib -- runtime."

Revert submission 16007539-nnapi-experimental-aidl-feature

Reason for revert: The cherry-pick of this CL breaks the build
Reverted Changes:
Ieb2da3461:Add neuralnetworks_utils_hal_aidl_v2 to allowed_de...
I8ae01e3c6:Provide explicitly version NNAPI AIDL utils lib --...
I74f1798e8:Provide explicitly versioned NNAPI AIDL utils libs...
I2362464e8:Use explicitly versioned NNAPI HAL util libs in da...

Test: mma

Change-Id: I3d3ac4745fb707cbdceb2019f3c2fc7807183b71
Merged-In: I3d3ac4745fb707cbdceb2019f3c2fc7807183b71
(cherry picked from commit 932e82b0c3)
2021-10-25 21:13:15 -07:00
Xusong Wang
cb2c37f78f Provide explicitly versioned NNAPI AIDL utils libs -- HAL.
This CL modifies the AIDL utils libraries to be explicitly
versioned. Currently, we only have two versions: v1 and "current".
Specifically, the following changes are made:
- Remove AIDL dependencies from neuralnetworks_utils_hal_common
- Create explicitly versioned libs of neuralnetworks_utils_hal_aidl_*

This is needed because it is not allowed for a build target to
link against multiple versions of the same AIDL lirary.

The canonical driver will report ANDROID_S for AIDL v1, and FL6 for v2.

Bug: 202405342
Test: NNT_static
Test: CtsNNAPITestCases
Test: VtsHalNeuralnetworksTargetTest
Change-Id: I74f1798e80a059949e43e0567d23e884a7f7c92d
Merged-In: I74f1798e80a059949e43e0567d23e884a7f7c92d
(cherry picked from commit 9763a9537d)
2021-10-25 12:58:44 -07:00
Treehugger Robot
32250df35e Merge "Backfill owner information for VtsHalPower." 2021-10-21 01:59:02 +00:00
Treehugger Robot
cb0667c916 Merge "Update OWNERS for VtsHalGraphicsComposer tests." 2021-10-20 19:28:03 +00:00
David Gross
6e74ca65a7 Merge "Add PACK operation to NNAPI feature level 6." 2021-10-19 21:23:12 +00:00
Treehugger Robot
68b3942abe Merge "health: AIDL add owners." 2021-10-19 21:13:20 +00:00
Treehugger Robot
c900d6f20e Merge "health: drop backup instance for non-recovery." 2021-10-19 20:23:56 +00:00
Yifan Hong
9ca39cef7f health: AIDL add owners.
... for usage in other places.

Test: none
Bug: 177269435
Change-Id: I74ea2a497237d966db0c146868c61a1a667e8cca
2021-10-19 19:51:58 +00:00
Yifan Hong
a76a2bf65b health: drop backup instance for non-recovery.
For the core variant (system), clients like storaged
etc. should no longer access the "backup" instance, because
healthd is removed from the system image.

For the vendor variant, this would only break if a
vendor image were launched with Android O / O-MR1 (so
health@2.0 is not required), and were compiled against an
Android T (and above) source tree (which won't check
the "backup" instance). This shouldn't be a valid configuration.

For the recovery variant, the "backup" instance has a different
meaning. It points to

  android.hardware.health@2.0-impl-default.recovery

... which was assumed by OEMs to be always installed when a
vendor-specific libhealthd is not necessary. Hence, its behavior
is kept. See

  hardware/interfaces/health/2.0/README.md

android.hardware.health@2.0-impl-default.recovery, and subsequently the
special handling of recovery mode below, can be removed once health@2.1
is the minimum required version (i.e. compatibility matrix level 3 is
removed). Health 2.1 requires OEMs to install the implementation
to the recovery partition when it is necessary (i.e. on non-A/B devices,
where IsBatteryOk() is needed in recovery).

Test: pass
Bug: 203245871

Change-Id: Ife14f5bdaba20e4cf5bd0b954aea4d04a62009c4
2021-10-19 12:50:11 -07:00
David Gross
79d63db0c8 Add PACK operation to NNAPI feature level 6.
Bug: 200281183
Bug: 200280665

Test: m -j NeuralNetworksTest_static
Test: VtsHalNeuralnetworksTargetTest

Change-Id: Ic15d047b70c62437b4f0db6f2ca10127591ae07c
2021-10-19 11:04:57 -07:00
Treehugger Robot
46753c42c2 Merge "Update OWNERS for VtsHalContexthub tests." 2021-10-19 12:52:53 +00:00
Treehugger Robot
80161cfc16 Merge "Backfill owner information for VTS module VtsHalOemLockV1_0TargetTest." 2021-10-19 02:16:30 +00:00
Treehugger Robot
b27df86140 Merge "Update OWNERS for VtsHalWifiSupplicant tests." 2021-10-19 00:55:03 +00:00
Yiming Pan
cd9afdf0af Update OWNERS for VtsHalGraphicsComposer tests.
Test: Tree Hugger
Bug: 143903671
Change-Id: I228402a350ecccac92dea7c5facde60496ba3e6e
2021-10-18 17:28:00 -07:00
Yiming Pan
97f2192a92 Update OWNERS for VtsHalContexthub tests.
Added a bug component where issues seen on this test are triaged.

Test: Tree Hugger
Bug: 143903671
Change-Id: Id0dd876c00206c372e7fa608fdd731be3d4d72bb
2021-10-18 17:18:04 -07:00
Michael Butler
68e98f40dc Merge "Allow implicit conversions for NN errors -- hal" 2021-10-18 22:45:51 +00:00
Treehugger Robot
b350c7cf49 Merge "Revert "VTS: Test that configs in a group differ only by vsync period"" 2021-10-18 21:39:37 +00:00
Treehugger Robot
184c1b546c Merge "Revert "Clarify the ComposerClient comment for CONFIG_GROUP"" 2021-10-18 20:56:12 +00:00
Snild Dolkow
0e9328e213 Revert "Clarify the ComposerClient comment for CONFIG_GROUP"
This reverts commit 37c5495c52.

This "clarification" was in fact a change of the HAL interface,
introducing a new requirement which was not present in earlier
Android releases. There are devices on the market that switch
seamlessly between configs that differ in resolution and DPI,
and therefore have those configs in a config group.

Bug: 200184776
Merged-In: I5bba1c6532f5f46da874385164a0bc0cc0435225
Change-Id: I5bba1c6532f5f46da874385164a0bc0cc0435225
2021-10-18 20:55:31 +00:00
Snild Dolkow
bf484a6adb Revert "VTS: Test that configs in a group differ only by vsync period"
This reverts commit 6f36dd6e31.

Differing only by vsync period was not a requirement on Android R, and
it shouldn't be added after-the-fact to an existing HAL version.

There are devices on the market that switch seamlessly between configs
that differ in resolution/dpi, and therefore have those configs in a
common group.

Bug: 200184776
Change-Id: Id0bfc67e55d5139fddb2b359cabafd9281c33734
2021-10-18 20:31:52 +00:00
Ian Hua
5dc5f2633f Merge "AIDL interface changes for NNAPI feature level 6." 2021-10-18 20:03:59 +00:00
Treehugger Robot
ad56c830f3 Merge "Backfill owner information for VtsHalVibrator*." 2021-10-18 18:09:23 +00:00
Treehugger Robot
cd6ab41533 Merge "Backfill OWNERS for VtsHalGraphicsMapper tests." 2021-10-18 17:41:51 +00:00
Ian Hua
068df81ab6 AIDL interface changes for NNAPI feature level 6.
- Add BATCH_MATMUL operation
- Support TENSOR_INT32 for RESHAPE operation.

Also update "current" version snapshot and use
android.hardware.neuralnetworks-V2-ndk since AIDL v1 has been frozen.

Bug: 193012662
Bug: 200281183
Test: mm
Change-Id: Iabe45c57e2306d61055f711eda03b80b9cbe906d
Merged-In: Iabe45c57e2306d61055f711eda03b80b9cbe906d
2021-10-18 11:38:55 +01:00
Yomna Nasser
b1e7ca32c6 Merge "VTS fix for getAllowedNetworkTypesBitmap and setAllowedNetworkTypesBitmap" 2021-10-16 02:21:12 +00:00
Michael Butler
ff9a5a527a Allow implicit conversions for NN errors -- hal
This change allows GeneralErrors to be created from a string and allows
ExecutionErrors to be created from a string or a GeneralError.
This makes error handling more terse, removing the need for helper
functions such as makeGeneralFailure or makeExecutionFailure.

Bug: N/A
Test: mma
Change-Id: I8c5e80a2eb4f399fad64aab763fe6fa08cf8d1db
2021-10-15 16:37:09 -07:00
Yiming Pan
f3f344a134 Backfill owner information for VtsHalVibrator*.
Owner information is backfilled for the following modules:
VtsHalVibratorTargetTest
VtsHalVibratorV1_0TargetTest
VtsHalVibratorV1_1TargetTest
VtsHalVibratorV1_2TargetTest
VtsHalVibratorV1_3TargetTest

Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I72b6f2312cd1863e24a05160d688bac86378e37a
2021-10-15 16:29:59 -07:00
Przemyslaw Szczepaniak
996054b24f Merge "Update OWNERS file" 2021-10-15 11:02:37 +00:00
Roshan Pius
274eadd581 wifi(vts): Precondition AP tests on existence of hostapd HAL
cp: aosp/1428863 to master branch

This used to be present on the old host side VTS tests, port the feature to
target side since host side VTS tests are deprecated.

Also,
i) Added a separate test: VtsHalWifiV1_4TargetTest to test the wifi
chip methods. Putting them in VtsHalWifiApV1_4TargetTest will prevent
these from running on devices without AP feature.
ii) Ensured all the non-NAN, non-RTT tests disable framework for
testing. NAN/RTT tests uses framework to check if the corresponding
package manager feature exists.

Bug: 166529516
Test: atest \
VtsHalWifiApV1_0TargetTest \
VtsHalWifiApV1_4TargetTest \
VtsHalWifiV1_0TargetTest \
VtsHalWifiV1_4TargetTest

Change-Id: I05aab6992277601633a0f926a8262c4c27402e93
2021-10-15 09:48:23 +08:00
Yiming Pan
af359f3acf Backfill OWNERS for VtsHalGraphicsMapper tests.
Done for the following tests:
VtsHalGraphicsMapperV2_0TargetTest
VtsHalGraphicsMapperV2_1TargetTest
VtsHalGraphicsMapperV3_0TargetTest
VtsHalGraphicsMapperV4_0TargetTest

Deleted the OWNERS file I created earlier to comply to your team's
convention.

Test: Tree Hugger
Bug: 143903671
Change-Id: I07790171fc1a42da37a43f590d8c5c2876ad1bfe
2021-10-14 17:45:53 -07:00
Treehugger Robot
1caa761eeb Merge "Backfill owner information for VtsHalWifi tests." 2021-10-14 21:34:00 +00:00
Michael Butler
f3bd4751a3 Merge "Handle error returned by IBurstContext::freeMemory" 2021-10-14 21:30:33 +00:00
Treehugger Robot
7f13389b5b Merge "Backfill VTS owner information." 2021-10-14 19:25:59 +00:00