Commit Graph

66019 Commits

Author SHA1 Message Date
Bart Van Assche
185589ba6c Revert "libhealthloop: Handle netlink receive buffer overflows"
Revert this CL because there are several signs that too much time
is spent in healthd and because CL "libhealthloop: Handle netlink
receive buffer overflows" is suspected of causing an infinite loop.

Bug: 359559224
Change-Id: Iaec132da47284d662b357b901b81b21fb6d7cd9e
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-27 14:22:14 +00:00
Bart Van Assche
0cfcfac12d libhealthloop: Handle netlink receive buffer overflows
The Linux kernel netlink implementation sets EPOLLERR if delivery of a
netlink message fails because of a buffer overrun (see also the Linux
kernel netlink_overrun() and sock_def_error_report() functions). Handle
buffer overruns by calling ScheduleBatteryUpdate() unconditionally.

Bug: 203462310
Change-Id: I54f7d239e6b4caad0db4d1b15de7c0385f796ebd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-05 15:56:16 -07:00
Bart Van Assche
6fe3618e7c libhealthloop: Micro-optimize HealthLoop::RegisterEvent()
BoundFunction is an alias for std::function<>. Copying a function object
may be expensive. Use std::move() to avoid copying std::function<>. From
https://engdoc.corp.google.com/eng/doc/devguide/cpp/std_function.md:
"Generally prefer both accepting and passing by value if ownership is
transferred. Recall that when using value semantics, it's important to
also use std::move() when appropriate."

Bug: 203462310
Change-Id: I9fb87737dd5ce0fbb84bfbbdb0f8bb952dea1fbc
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-05 15:55:24 -07:00
Bart Van Assche
8bb6819c66 Merge "HealthLoop.cpp: Minimize #include directives" into main 2024-08-05 16:19:42 +00:00
Kangping Dong
0bac41a055 Merge "[Thread] add an override_apex for Thread HAL with simulation RCP" into main 2024-08-05 09:28:05 +00:00
Kangping Dong
2bc926ed05 [Thread] add an override_apex for Thread HAL with simulation RCP
This commit adds a new apex override for the Thread HAL which uses a
simulation RCP. This will be used by goldfish emulators.

Note that this can't be defined in /device/generic/goldfish because of
below error:

```
[100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/build.sdk_phone64_x86_64.ninja
FAILED: out/soong/build.sdk_phone64_x86_64.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i  "$BUILDER"     --top "$TOP"     --soong_out "out/soong"     --out "out"     --soong_variables out/soong/soong.sdk_phone64_x86_64.variables -o o
ut/soong/build.sdk_phone64_x86_64.ninja --globListDir sdk_phone64_x86_64 --globFile out/soong/globs-sdk_phone64_x86_64.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.sdk_phone64_x86_64.bui
ld Android.bp
Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk'
Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existing optional_uses_libs 'wear-sdk'
error: hardware/interfaces/threadnetwork/aidl/default/Android.bp:103:1: "com.android.hardware.threadnetwork" depends on undefined module "goldfish-threadnetwork-service.rc".
Module "com.android.hardware.threadnetwork" is defined in namespace "." which can read these 1 namespaces: ["."]
Module "goldfish-threadnetwork-service.rc" can be found in these namespaces: ["device/generic/goldfish"]
```

Bug: 356079409
Test: verified that "adb shell cmd thread_network join" works
Change-Id: I5356df53486fe9555ab34a0c8402e7be1b31309f
2024-08-05 16:38:02 +08:00
Bart Van Assche
7087858515 HealthLoop.cpp: Minimize #include directives
Remove the #include directives for header files of which no symbols are
used.

Bug: 203462310
Change-Id: I0d1678d9d01f05d7dc83e70b5f4df0f1129b1968
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-04 16:20:25 -07:00
Bart Van Assche
ce06c8ba6f health/2.1/default/Android.bp: Reformat with bpfmt -s -w
Change-Id: I04a94776bda9bbd08b2af2dceba177e90f60e27c
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-08-04 07:20:58 -07:00
Sandeep Jawalkar
a345db34d8 Merge "update vts setSimSlotMapping test cases to handle different MEP types Bug: 342543877 Test: atest PerInstance/RadioConfigTest#setSimSlotsMapping/0_android_hardware_radio_config_IRadioConfig_default" into main 2024-08-03 23:46:13 +00:00
Jakub Tyszkowski
291b5d7510 VTS: Support VERSION_AIDL_V5
Bug: 352454998
Test: atest VtsHalBluetoothAudioTargetTest
Flag: Exempt; test only change
Change-Id: Icfca5680359a8287bd5994de26573a89c70f34da
2024-08-02 13:05:27 +00:00
Jakub Tyszkowski
f5015ce683 Fix matching the results
Trivial fix of using wrong variable name.

Bug: 352454998
Test: atest VtsHalBluetoothAudioTargetTest
Flag: Exempt; trivial fix covered with unit tests
Change-Id: I666c684dbd9f2b58a3d1cbe7449e21af57e55df4
2024-08-02 12:47:58 +00:00
Shih-Cheng Tu
d69acec03e Merge "Skip event count assertion on reporting mode" into android14-tests-dev am: 70be0c430b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3152456

Change-Id: I0638cc51cdf145a052e7d531423e25450fb35bf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 05:47:48 +00:00
Shih-Cheng Tu
70be0c430b Merge "Skip event count assertion on reporting mode" into android14-tests-dev 2024-08-01 05:35:52 +00:00
Shih-Cheng Tu
09cf466c2f Skip event count assertion on reporting mode
Sensors with reporting mode "One-shot" and "Special" will not trigger event on "activate", hence the test that expecting the event
count after calling activate() will fail.

Skipping the event count assertion if the device only has sensors with these reporting mode.

Bug: 349268211
Test: run vts -m VtsAidlHalSensorsTargetTest -t Sensors/SensorsAidlTest#CallInitializeTwice/0_android_hardware_sensors_ISensors_default
Change-Id: I656a652fc205961b8e6207942ccf16a71a08dc14
2024-08-01 02:31:08 +00:00
James Eidson
4cb59fdcb0 Merge "[uwb-hal] Add antenna mode capability" into main 2024-07-31 22:11:57 +00:00
Treehugger Robot
d882c6a09b Merge "Fix validation logic in TvInputAidlTest" into main 2024-07-31 16:32:52 +00:00
Shuzhen Wang
7801c0bcf5 Merge "Camera: VTS: Adjust test to handle optional readoutTimestamp support" into main 2024-07-31 14:50:20 +00:00
Justin Yun
cb8fb432f2 bump.py automatically updates the code for libvintf
Vintf finalization requires adding the new API levels to the libvintf
code. Add the automation script for that with the finalization
process.
This process will be skipped if the code already has been updated.

Bug: 331696132
Test: tools/finalization/build-step-0-and-m.sh
Change-Id: Ibd6a71337d88b71708ef378e3862e6c67364b92b
2024-07-31 12:43:20 +09:00
Shuzhen Wang
ff805c114a Camera: VTS: Adjust test to handle optional readoutTimestamp support
With readout timestamp support becomes optional in b/309543399, we
need to adjust the VTS test to handle it.

Test: vendor testing
Bug: 354875531
Change-Id: I552b223f7834df83b8c0bae9f23ab7393a42b64a
2024-07-31 00:20:26 +00:00
James Eidson
1b7f879188 [uwb-hal] Add antenna mode capability
Bug: 341159131
Test: n/a
Change-Id: I4314405e3053fe5f029ef4cd8489708629042c2a
2024-07-30 21:52:22 +00:00
Treehugger Robot
0931592367 Merge "Optimize matching logic for multiple requirements at once." into main 2024-07-29 09:06:38 +00:00
Ray Chin
6268b80392 Fix load vts configuration error am: 665b996908
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3196518

Change-Id: I5b716362778dec9c606d1093aa652188d5d28076
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-29 00:03:36 +00:00
Ray Chin
665b996908 Fix load vts configuration error
The array has static size. It will always return the same value no
matter it read something from the vendor property or not. Change to
check the string length can fix this issue.

Bug: 355329871
Test: cf_x86_tv
Change-Id: I37abd66fbc973c454b6ae72ecdab70c13581a13f
2024-07-27 09:27:21 +08:00
Bao Do
767222af54 Optimize matching logic for multiple requirements at once.
We now prepare all settings that matched with the capabilities,
then find the correct context settings first.
This helps reuse the list of all settings for the next requirement.

Bug: 331490291
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: Ie27a471264f384700b754156b7db894b65b4cd82
2024-07-26 17:14:32 +08:00
Treehugger Robot
3935a3fa5d Merge changes from topics "nfc_aosp_main_merge", "nfc_aosp_main_merge_stage2" into main
* changes:
  Use parameterized test to disable test for devices without NFC
  Add VSR min API level
  Add VTS test for NFC observe mode
  [Hal] Add request/release control event in aidl interface.
2024-07-25 03:30:22 +00:00
Myles Watson
fcd1963a3c Merge "VtsBluetooth: Update advertising set requirements" into main 2024-07-24 22:36:56 +00:00
Myles Watson
864c904897 VtsBluetooth: Update advertising set requirements
The requirements for advertising sets are the same in the
published VSR requirements for TV and other Android devices,
so there should be no difference in the test.

Bug: 353619486
Test: mma -j32
Change-Id: I48189896138da4efacbe1ce8e46f4267e956771f
2024-07-24 14:39:10 -07:00
Treehugger Robot
592430c84e Merge "audio: Use 'join' instead of 'stop' for stream workers" into main 2024-07-24 21:06:59 +00:00
Steve Pomeroy
a667849ed0 Use parameterized test to disable test for devices without NFC
Test: atest VtsNfcBehaviorChangesTest
Bug: 345575225
Merged-In: I22393acc260d200d2e472d276c64af005a75ab6b
Change-Id: I22393acc260d200d2e472d276c64af005a75ab6b
2024-07-24 10:11:33 -07:00
Steve Pomeroy
b38108f4db Add VSR min API level
Bug: 331231122
Test: atest VtsNfcBehaviorChangesTest
Merged-In: I6685e75f04330c9f5d497ce219d8da00a753ffdf
Change-Id: I6685e75f04330c9f5d497ce219d8da00a753ffdf
2024-07-24 10:11:24 -07:00
Steve Pomeroy
bb7f928fae Add VTS test for NFC observe mode
Test: this is only a test; manual run on a device
Bug: 305979303 326470047
Merged-In: Idf4953e942bb5db8c2ee72779dfdf80ed4e224b2
Change-Id: Idf4953e942bb5db8c2ee72779dfdf80ed4e224b2
2024-07-24 10:11:16 -07:00
Mikhail Naganov
657284d4ef audio: Use 'join' instead of 'stop' for stream workers
Calling 'stop' can cause the worker thread to terminate
before it handles the 'halReservedExit' command. This should
be avoided because a proper exit sequence may do cleanups.
Since all stream workers must handle the 'halReservedExit'
command, use of 'stop' should not be needed (if the thread
code gets stuck on a call to drivers, calling 'stop' will
not interrupt this), thus it is being replaced by 'join'.

Bug: 344482249
Test: atest CtsMediaAudioTestCases
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If13f7239423657b80091239ff67e7fe350957e2e
Merged-In: If13f7239423657b80091239ff67e7fe350957e2e
2024-07-24 08:53:19 -07:00
Steven Moreland
1a48b2d416 Merge "Update bug component from Android Systems to memory" into main 2024-07-23 22:07:36 +00:00
Nate Jiang
e24c5eb6ba Merge "add filegroup for wifi aidl/nlinterceptor" into main 2024-07-23 18:11:20 +00:00
ziyiw
dad5092eae [Hal] Add request/release control event in aidl interface.
Test: compile
Bug: 344753047
Change-Id: I1e5628a3105f8ee804ed0f40d386fda872b4442b
2024-07-23 10:24:00 -07:00
Alessio Balsini
29a5608b60 Update bug component from Android Systems to memory
It's been a while since the Android Systems bug component does not
access the creation of new bugs for triage, instead, new bugs must
be created in the subcomponents of the team.

Test: none
Bug: 270571229
Change-Id: I4826466c780f1fdecd9970127a501d3f2d4858fb
Signed-off-by: Alessio Balsini <balsini@google.com>
2024-07-23 12:06:47 +00:00
Treehugger Robot
080d6b39ed Merge "audio: Prolong reading attempts from the remote submix pipe" into main 2024-07-22 18:08:07 +00:00
Treehugger Robot
6bb0136d22 Merge "Add owner to stable interfaces in /staging" into main 2024-07-22 17:23:58 +00:00
Mikhail Naganov
2be5078e25 audio: Prolong reading attempts from the remote submix pipe
In order to use the time interval for reading from the remote
submix pipe more efficiently, increase the deadline time
to the buffer duration minus a small amount. This should
minimize chances to have discontinuities in the remote submix
input.

Bug: 334363414
Test: atest --test-filter=".*RemoteSubmixTest#testRemoteSubmixRecordingContinuity" CtsMediaAudioTestCases
Change-Id: I02968d09afd8ecdad4d61e635393842d7280e55f
2024-07-22 16:04:23 +00:00
Mikhail Naganov
96c0123401 Merge "audio: Restrict reported channel masks to "mono" and "stereo"" into main 2024-07-22 14:34:22 +00:00
chao.meng
c0e563b841 add filegroup for wifi aidl/nlinterceptor
Change-Id: If8eb343f5a73d99a99c2f47c4ee8223b78088e48
2024-07-22 13:43:36 +08:00
Bao Do
d6c8a4b38e Merge changes Iefd406fc,I0f6cfbda into main
* changes:
  New parsing logic and configuration matching for LE Audio
  Update the default set configuration file and format.
2024-07-19 07:18:24 +00:00
Mikhail Naganov
8c27e46bb9 audio: Restrict reported channel masks to "mono" and "stereo"
When translating supported channel counts into channel masks,
only use channel layouts for 1 and 2 channels: "mono" and
"stereo", while reporting all other counts via indexed
masks. This helps to support output to multichannel USB Audio
interfaces properly.

Bug: 329571487
Test: repro steps in the bug
Change-Id: Ibbbf71e7f04a6622cccaddeb3f4f140193d7f8fb
2024-07-18 17:03:53 -07:00
François Gaffie
ed095e62ab Restore Default Device Effects support with AIDL AudioHAL
Bug: 329395147
Test: atest CtsMediaAudioTestCases
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit

Change-Id: I0f4f680b4db4eaa69d6c6e9e7b897631ed94928b
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2024-07-18 23:16:43 +00:00
Devin Moore
7feef702ca Add owner to stable interfaces in /staging
This interface is in staging because it's not ready to become a fully
supported HAL interface. Without "owner", we expect it to be frozen
after API freeze.

Adding owner field to enable API Freeze tests in continuous integration.

Test: none
Bug: 331696132
Change-Id: If56371438f61b771d0024d3091bde19b5d1b3e8c
2024-07-18 22:48:39 +00:00
Weston Carvalho
5102a37278 Merge "Remove Secure Storage AIDL tamper and A/B update" into main 2024-07-18 19:49:12 +00:00
Treehugger Robot
11caf68b6b Merge "Add TEST_MAPPING file for fmq tests" into main 2024-07-18 16:20:23 +00:00
Bao Do
649569202b New parsing logic and configuration matching for LE Audio
Match the supported allocation channels from the device's capability
and remove loose matching ability.
This helps with choosing the correct configuration respecting
the device's number of ASE.

We also add "name" field for easier debugging.

Bug: 331490291
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: Iefd406fcd913ce553a02242b0a2100cab431476e
2024-07-18 16:59:48 +08:00
Bao Do
f6ce19d697 Update the default set configuration file and format.
New format eliminates the need for allocation and
deduplicates many configurations.
We change the file name of the default set configuration
for intergration with vendor's configuration.

We also support storing the configuration name in
the vendor's metadata for easier debugging.

Bug: 331490291
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: I0f6cfbdad1da05c35d7c758c69d7030527e1f46a
2024-07-18 13:46:16 +08:00
Devin Moore
68a0d78d58 Merge "Revert^2 "Update HIDL EventFlagBits to have the correct values"" into main 2024-07-17 22:57:36 +00:00