- Support formatting AIDL files. I found the formatter from b/144540481.
- Support working for other Thread repos like external/ot-br-posix.
Test: verified locally
Change-Id: I805af4989c80629264b53f46fa58afa4a04bb26f
This CL refactors the code of ThreadNetworkControllerService to use
immutable BorderRouterConfiguration.
Bug: 358012289
Test: CI
Change-Id: Ifabf0144d5e8f5b5da2b8d64fc9e53c46f917dbb
This CL adds an integration test case for NAT64. Because the feature is
not fully ready, we need some extra setup steps to make the feature
work. That is, specifying a CIDR for NAT64. Also, this test case is
based on `ot-ctl` but eventually the test should be based on API.
This CL requires https://github.com/openthread/openthread/pull/10566.
Bug: 356770473
Test: atest ThreadNetworkIntegrationTests
Change-Id: Idfb5ad848f7b2369591e47558ea67017c0b31e19
This CL also refactors the IntegratoinTestUtils a bit to make it more
reusable.
Bug: 356770473
Test: CI
Change-Id: Ief94e312e06e4b62c71284c8ff0ef710f0b632fb
This CL adds a test case to verify the upstream network request has
desired transport types and network capabilities.
Bug: 356346764
Test: CI
Change-Id: Id81b5f60ce2ca574582aaf106840eab0b7aca927
Previously the upstream network selector wrongly cleared the default
network capabilities so there's a risk of choosing VPN as the upstream
network, which is undesired.
Bug: 356346764
Test: atest ThreadNetworkIntegrationTests
ThreadNetworkControllerServiceTest
Change-Id: Ic1762775734d734f1974a753f100814b61d66589
This CL adds 3 things as @SystemApi:
- The ThreadConfiguration class except the Builder nested class.
- The ThreadNetworkController#registerConfigurationCallback method.
- The ThreadNetworkController#unregisterConfigurationCallback method.
Bug: 342519412
Test: CtsThreadNetworkTestCases
Change-Id: I8d3e48b73d471af1515f251451a1259a4bde69af
The test was flaky because we didn't give enough time for SRP
registration to complete.
The waiting should be counted as started when the SRP server is available).
Previously we started the waiting before the availability of SRP server
so the counted waiting time may be longer than expected which causes
the wait to timeout and fail the test case.
This CL also extracts some common utils from integration test cases to
the IntegrationTestUtils class.
Bug: 353836718
Test: Locally passed 50 times in a row
Change-Id: I2f648a21d57025b082296b4e562c46432ab04ff8
This is basically a revert of aosp/3079292 to disable the handling of
the airplane mode. The cause is that there are a few reported ANR issues
on real devices and they points to the handlers here in Thread module.
Before we figure out the root cause, let's disable the airplane mode
handler in Thread to recover the presubmit tests.
Bug: 353115531
Bug: 352484437
Bug: 350586929
Bug: 352316041
Change-Id: I569ced2855658f965ddf51242600ee3c325781a7
per offline discussion, it's better to provide support of customizing
any vendor-specific TXTs to make the solution more generic. The preivous
defined "vgh" TXT entry is deprected.
Bug: 343671003
Change-Id: I6e2804e346d04078b7d28bfdc18ed6c23c5c10e6
This commit fills in the ticks of active timestamp of randomly generated
dataset as defined in Thread spec.
Bug: 347838683
Change-Id: I5d8ba3ca7728e1890996fdd64198f7bc90bfb1fa
* changes:
[Thread] support ThreadConfiguration API at ThreadNetworkControllerService
[Thread] add support for configuration at ThreadNetworkController
Treehugger Robotauthored and Gerrit Code Reviewcommited 2024-06-24 10:03:18 +00:00
This CL adds methods for setting the ThreadConfiguration and
subscribing/unsubscribing to Configuration changes. The ThreadConfiguration
is used for controlling Thread features for the device.
Bug: 342519412
Change-Id: I9e20391eb3b2f20312a2cb0b587cc5bdf200d24d
It turns out context.registerReceiver(receiver, intentFilter,
permission, flags, handler) is not posting the receiver on the handler
and will result in ANR in activity manager if the receiver is blocked
This commit makes it safer by posting the receiver body to mHandler
explicitly.
Bug: 340368050
Change-Id: Ib6b8c0a8952ce43c935f39b0978f47268b108a79
This is to avoid running tests on devices that do not support Thread. Otherwise, the tests will fail with ClassNotFoundException when the test classes are loaded
Change-Id: I286394ae925ad7258aa82cd308ac963ee334992c
When developing and debugging a test case, sometimes the FTD may stuck and will not give any output. In such a case the test may time out after 1 minute (or longer). We should enforce a timeout (e.g. 5 seconds) when reading from its stdout so we don't have to wait for it that long.
Bug: 343885515
Test: CI
Change-Id: I766c172364106f19500032459de12ed6de38fb05
On U- devices, the ThreadNetworkManager class is not available, so we need to use the service name instead. And we should make sure Thread test cases runs on only devices that does has Thread feature supported.
Change-Id: Idd356062277a5180933789c7d471c70e2689350d
This CL lets NsdPublisher support resolving an mDNS host via one-shot
mDNS query. Because NsdManager not yet responds to such a query
properly, we cannot add an integration test for this. I've verified the
Discovery Proxy use case work properly on real devices.
Bug: 322434640
Test: atest NsdPublisherTest
Change-Id: Ie67f2fb9dd012408c123c354fc29f1a943280780
Only call onThreadEnableStateChanged() when the callback is registered
or the state has changed.
Bug: 342999416
Test: atest CtsThreadNetworkTestCases:android.net.thread.cts.ThreadNetworkControllerTest#subscribeThreadEnableState_getActiveDataset_onThreadEnableStateChangedNotCalled
Change-Id: I822d2b98b221c3312ff472b82ebb3e7e88e313fe
On some devices, Thread and Bluetooth HAL share a single UART device
and Thread HAL (hence ot-daemon) can't be started when the Bluetooth
HAL is disabled. When airplane mode is turned on, Bluetooth service may
receive the broadcast event first and disable the Bluetooth HAL. This
effectively stops Thread HAL and ot-daemon. When the
ThreadNetworkControllerService receives the death signal, it doesn't get
the airplane mode changed event from the system yet and so it tries to
restart ot-daemon. Then get blocked because ot-daemon can't be started
now (because the Thread HAL can't be started).
The proper fix is to allow enabling/disabling Thread HAL independent of
the Bluetooth HAL, so that Thread can function no matter Bluetooth is
disabled or not. But that may takes longer fix cycles, so here takes a
wrokaround by always querying the latest airplane mode value from
Settings.Global when deciding whether to restart ot-daemon in the death
handler.
Test: test on the real device that ot-daemon will not be requested to
restart when airplane mode is turned on
Bug: 340744397
Bug: 340236524
Bug: 340368050
Change-Id: I603d085d66a95b612c613ba07dc432ff0df135db