dumpHexString will create additional representations other than a HEX string, it's suitable for raw logging message but not in a Object#toString.
Change-Id: I184eb10bafa2db1103a4ef5cf82250db52aec278
This CL checks if the device supports Thread specific features before
running the test case ThreadNetworkControllerTest. If the device
doesn't support specific features, just skip the test case.
Bug: b/330879812
Test: atest ThreadNetworkIntegrationTests
Change-Id: I1452ab02cc62228102d4a140f39abf13b79542c7
1. the OtDaemonState in OtDaemonCallbackProxy class is not cleared when
ot-daemon dies
2. register ot-daemon state callback within the IOtDaemon#initialize API
to avoid missing state changes between initialize() and
registerStateCallback()
Bug: 330441708
Change-Id: Ice58566582b40a6d25627cf01dec93da61ad3596
When calling a ot-daemon API, getOtDaemon() should always be used.
Access mOtDaemon directly can crash because it will be reset to null
when ot-daemon dies.
Change-Id: Id9941497fd43b1d57aba4bace31be0fbd9439c9c
The `setChannelMaxPowers` allows privilege app to set the max
power of each channel. It is going to be used for controlling the
output power of the Thread radio chip.
Bug: b/320594263
Test: atest ThreadNetworkUnitTests && atest CtsThreadNetworkTestCases
Change-Id: Ic47eccd6de2da0e6cdb8f21d5b4df156b1f11747
The Thread HAL supports only one client for a single Thread chip, so
ot-daemon needs to be force stopped in VTS tests because the testapp
needs to connect to the HAL service to perform tests.
Bug: 328538612
Change-Id: I5288e5747ab3957050d0e85c1ea684c6ead6c87d
Current implementation will auto-restart ot-daemon even when Thread
has been disabled by ThreadNetworkController#setEnabled(false). This
commit fixes this issue and also adds the "enable" / "disable" shell
command to ease testing.
Bug: 328538612
Change-Id: Icc9360ccf5d7daa6345def75d1860f046600b85b
Vendor or product extra apps/files can't be added to the generic system
image. Like below error:
```
FAILED:
build/make/core/artifact_path_requirements.mk:31: warning: vendor/google/products/cf_x86_64_phone.mk produces files inside build/make/target/product/generic_system.mks artifact path requirement. Consider adding this file to the system_ext or product partition instead. Confused? Ch
eck out go/artifact-error.
Offending entries:
system/etc/permissions/privapp-permissions-com.android.threadnetwork.demoapp.xml
system/priv-app/ThreadNetworkDemoApp/ThreadNetworkDemoApp.apk
```
Bug: 330097284
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4c39c8f63edfa55edbd84a8473887df17ffe52fd)
Merged-In: I1b3723c12da44d80555aa35a86b9bae722845cb3
Change-Id: I1b3723c12da44d80555aa35a86b9bae722845cb3
Kangping Dongauthored and Android Build Cherrypicker Workercommited 2024-03-19 12:44:43 +00:00
Currently support customizing the vendor name, vendor oui and model
name.
Bug: 311324956
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest#meshcopOverlay_vendorAndModelNameAreSetToOverlayValue
Change-Id: I3ad916112c73c3f8a7eef4e3fa8d421ab9bf8276
This commit creates the new `ThreadNetworkControllerWrapper` class to
unify the asynchronous version of the ThreadNetworkController API to
simplify Thread tests.
Test: atest ThreadNetworkIntegrationTests
Change-Id: Ibc6e6e2dad5041b092315aa0278915c137867488
In the tests there may not be a reponse to ftd ping command, and the
function does not check for ping success. So using a short timeout of
0.1s to let the function finish faster.
This change also removed the additional start BR step in
unicastRouting_borderRouterSendsUdpToThreadDevice_datagramReceived as
this is already done in setUp().
Bug: 328144082
Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I18202c74596d4a08bc8238723049e05994cca659
The privileged permissions needs to be included in the allowlist to be
able to pre-install the ThreadNetworkDemoApp.
Otherwise RuntimeException like below will be thrown to stop the device
from booting up:
```
03-18 07:13:46.288 4920 4920 E AndroidRuntime: java.lang.IllegalStateException: Signature|privileged permissions not in privileged permission allowlist:
```
Bug: 330097284
Test: `lunch aosp_cf_x86_64_phone-trunk_staging-userdebug && m` and
verified that the demoapp can be started
Change-Id: Ia6876e2eff1cde837be9e69954b2c749525e9e3c
The Thread persistent setting file may be missing if a new device is
started or the file is deleted on the device. Updated the logging from
error to warning as the file will be created.
Test: presubmit
Change-Id: I107712fc6fef61f26bc9be49fd703e61beae32a6
It's error-prone to check dependent feature in both setUp() and
tearDown() to filter specific Thread tests. This commit adds
`ThreadFeatureCheckRule` and refactor the Thread tests to use the new
test rule to filter test cases.
Test: manually verified the annonated tests are skipped with
ASSUMPTION_FAILED when the dependency feature is not supported
Change-Id: I7a5efe6bda53fc1a6e204f6f40dd3ab2c3940988
This is needed by `ot-daemon` to clear all registrations when
re-initializing the `ot-daemon`'s `Application` class.
Bug: 323301831
Change-Id: I5ed3d2d29b08f4187ac1f406052d362cf2249c19
Due to aosp/2936050, NET_CAPABILITY_LOCAL_NETWORK is mandatory in the NetworkRequest before Android V to request a Thread network. Without this ThreadNetworkControllerService cannot get the Thread network so that it cannot bring up border routing.
Bug: 329464390
Bug: 329403058
Change-Id: Ic033288789d338c2fe6d0abde474acd24657ad5f
Multicast routing is only supported on 14_5.15.0 and onwards. When sdk
version is 34+, thread is supported, if kernel version is e.g.
5.15.144-android13 then multicast routing is not supported so we need to
skip multicast routing tests.
Bug: 328133320
Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I5d67f4558b40ee3ec0569298c7c02726d5d19e98
network
There's a defect in ot-daemon that re-forming a network after erasing
the persistent data will take longer delay. We can use the
`factoryreset` command to work this around so that the test cases take
less time.
Bug: 323301831
Bug: 328235705
Change-Id: I36e67fe0f7f1165a03e71397065a6166117acadb
This CL also adds an integration test case for the Advertising Proxy feature.
Currently the test case is disabled because it's unstable on some branches.
Will re-enable the test case when it's stable enough.
Bug: 318323473
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest
Change-Id: Ic88efb3b80640f95b53e4ec2428369e87be71649
The multicastRouting_infraNetworkSwitch_outboundPacketIsForwarded test
has been flaky due to it sometimes taking more than 66000ms. Make the test
execution time shorter by pinging one multicast address instead of two
from the ftd.
Bug: 328144082
Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I1a1b3526f49befa7c367a8e6c5eb86463f97e986
This CL also adds an integration test case for the Advertising Proxy feature.
Bug: 318323473
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest
Change-Id: I626aa6250bc2cb94aee09067b4f8e6b14bd90fcf