Commit graph android_packages_modules_Co.../thread
Message SHA1
[Thread] rename requestThreadNetwork to registerThreadNetworkCallback
Change-Id: I5d0c2e6b094fcd7e4175b7b2a2c4705ae2ad981d

Kangping Dong   commited 2024-09-12 05:44:56 +00:00
0ffdc107e7
Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a

Jihoon Kang   commited 2024-09-10 00:01:31 +00:00
8401b6a9f0
Merge "[Thread] move infra network utilities to IntegrationTestUtils.kt" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-09-05 13:33:31 +00:00
7c831a94c6
Merge "[Thread] refactor IntegrationTestUtils to use Kotlin" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-05 07:57:05 +00:00
f991318e8c
[Thread] move infra network utilities to IntegrationTestUtils.kt
This CL moves setUpInfraNetwork(), tearDownInfraNetwork() and
startInfraDeviceAndWaitForOnLinkAddr() into IntegrationTestUtils.kt
because they'll also be used by Internet Access test cases which will be
in a new file.

The methods are refactored in Kotlin to be easier used in new test
cases. The new test cases will also be written in Kotlin.

Bug: 356770473

Change-Id: I2e5788ba87f9f86dd14d382db0b0de791bcbce6a

Handa Wang   commited 2024-09-05 05:59:51 +00:00
d92b389c63
[Thread] refactor IntegrationTestUtils to use Kotlin
This CL refactors IntegrationTestUtils class to Kotlin. As more test
cases are introduced, it's likely we'll add more code into this class.
It's worth a refactor of the code so that we can write the new code in
Kotlin which is more concise and safer.

Change-Id: I8b71c5183cad9224ee49e2192aa5aab62aae9ddb

Handa Wang   commited 2024-09-05 05:59:46 +00:00
26b68536bf
Merge "thread: rename init.34rc to ot-daemon.34rc for clarity" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-03 20:47:30 +00:00
2c018db04a
Merge "Enabled CtsThreadNetworkTestCases for secondary_user_on_secondary_display" into main
Mayank Garg   authored and   Gerrit Code Review   commited 2024-09-03 17:48:48 +00:00
ba4be1423a
Introduce LoggingOtStatusReceiver for logging results of IOtDaemon methods
This is a refactor CL to get rid of two almost identical IOtStatusReceivers.

Bug: 362861470
Change-Id: Iae004eab0c6735359924ab0f6546e84d55d29ff7
Test: None

Handa Wang   commited 2024-09-02 08:05:47 +00:00
113dfaf43d
[Thread] Use SharedLog in ThreadNetworkService
This CL replaces all Log.i/e/w/d/wtf with SharedLog in ThreadNetworkService and its subcomponents.

Note that here are some necessary changes:
- Log.d() is changed to SharedLog.v()
- Only ERROR and WTF level of SharedLog supports Throwable. Some logging statements are changed slightly.

Bug: 351956873

Change-Id: I9c48381195fb3e96b7115ec2ebf229af048ea8de

Handa Wang   commited 2024-09-02 04:52:03 +00:00
2e397aebcd
thread: rename init.34rc to ot-daemon.34rc for clarity
(this renames the file in the apex, but should otherwise not matter)

Test: TreeHugger, manually on cf (thread daemon still starts)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6087f95b0f3a4ba10b922ca78d2210377d5075ea

Maciej Å»enczykowski   commited 2024-08-30 18:43:42 +00:00
bd1fd22ffa
[Thread] split the configuration and the infra link state
This CL works with the corresponding ot-br-posix CL to separate the
config and the infra link state. In this way,
ThreadNetworkControllerService will call different APIs to send the
config/state to ot-daemon.

Bug: 362172947

Change-Id: Iae98325358f81ea2ff0c672577cc21a128ae049a

Handa Wang   commited 2024-08-28 09:28:46 +00:00
989cc83c27
Enabled CtsThreadNetworkTestCases for secondary_user_on_secondary_display
secondary_user_on_secondary_display is for background users that have
access to UI on assigned displays (a.k.a. visible background users) on devices that have config_multiuserVisibleBackgroundUsers enabled. The main use case is Automotive's multi-display Whole Cabin experience where
passengers (modeled as visible background users) can interact with the display in front of them concurrently with the driver (modeled as the the current user) interacting with driver's display.

Tested on gcar_md emu

Flag: TEST_ONLY

Bug: 356700021
Bug: 354233217
Bug: 358707308
Test: atest --user-type secondary_user_on_secondary_display CtsThreadNetworkTestCases
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b642178a9426f854f4496c07c8440d5ed417167c)
Merged-In: Iad7deb2c2715f6ef684ecc16b95a2fbbc7bb5260
Change-Id: Iad7deb2c2715f6ef684ecc16b95a2fbbc7bb5260

Mayank Garg   authored and   Android Build Cherrypicker Worker   commited 2024-08-26 19:08:25 +00:00
47b87650d1
Merge "changes the API setChannelMaxPowers from hide API to system API" into main
Zhanglong Xia   authored and   Gerrit Code Review   commited 2024-08-26 14:03:50 +00:00
b5ddf3a056
[Thread] rename BorderRouterConfiguration to OtDaemonConfiguration
This is a no-op name refactoring CL to prepare for supporting Thread
in mobile use cases where Thread won't operate as a Border Router.

Flag: EXEMPT AIDL interface change (plus it just changes names)

Change-Id: Ib27bcb5b9cd5e9d04db720fde356be15e90068fa

Kangping Dong   commited 2024-08-26 08:27:35 +00:00
3c222a895a
changes the API setChannelMaxPowers from hide API to system API
This CL changes the hiden API `setChannelMaxPowers` to system API
to allow the privilege app to set the max power of each Thread channel.

Bug: b/346686506
Test: atest CtsThreadNetworkTestCases
Change-Id: I1089a4a315971c3bca8ec688a02143ddec93d039

Zhanglong Xia   commited 2024-08-26 10:07:36 +08:00
5bbfd91b04
Merge "[docs] initial Thread Border Router vendor guide" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-08-21 03:27:38 +00:00
e1b7abd0c4
[docs] initial Thread Border Router vendor guide
Provide a guide for vendors to build their own Android-based Thread
Border Router products.

Bug: 330346403

Change-Id: I93c9f37316992692113552eadd73f3d69a9abc71

Kangping Dong   commited 2024-08-20 19:23:35 +08:00
85b0306bc7
Use java_aconfig_library for nearby and thread flags
Connectivity repo now can use java_aconfig_library since this target is
available on all downstream branches.

Bug: 345121279
Test: TH
Change-Id: I6d267ddac89731a8efbef2ee98a3baa1df754ff5

Motomu Utsumi   commited 2024-08-16 16:59:08 +09:00
dbb82c0581
[Thread] format AIDL files
Change-Id: Ic822710af1790a946bff838429cb98d2c6c3eef9

Handa Wang   commited 2024-08-12 06:22:01 +00:00
396db6050c
[Thread] enhance make-pretty.sh
- 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

Handa Wang   commited 2024-08-12 06:21:58 +00:00
f2be286fde
[Thread] use immutable BorderRouterConfiguration
This CL refactors the code of ThreadNetworkControllerService to use
immutable BorderRouterConfiguration.

Bug: 358012289
Test: CI

Change-Id: Ifabf0144d5e8f5b5da2b8d64fc9e53c46f917dbb

Handa Wang   commited 2024-08-07 07:36:28 +00:00
ed24de9b64
Merge changes from topic "nat64-integration-test-case" into main
* changes:
  [Thread] add an integration test case for NAT64
  [Thread] support polling IPv4 packets in integration test

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-08-07 02:23:23 +00:00
bf52fa708e
[Thread] add an integration test case for NAT64
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

Handa Wang   commited 2024-08-07 01:12:50 +00:00
d38b7cb30f
[Thread] support polling IPv4 packets in integration test
This CL also refactors the IntegratoinTestUtils a bit to make it more
reusable.

Bug: 356770473
Test: CI

Change-Id: Ief94e312e06e4b62c71284c8ff0ef710f0b632fb

Handa Wang   commited 2024-08-07 01:12:46 +00:00
09e71714fb
[Thread] add a test case to validate the default upstream network request
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

Handa Wang   commited 2024-08-05 14:02:24 +00:00
89a81a15be
Merge "[Thread] change the call to configureBorderRouter due to refactor" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-08-05 11:05:36 +00:00
65fd99a573
[Thread] change the call to configureBorderRouter due to refactor
Bug: 357501813
Test: CI

Change-Id: Ia6b63f59e927175d05a6d3da6cebe11491664071

Handa Wang   commited 2024-08-05 08:09:24 +00:00
7482055f9e
Merge "[Thread] fix upstream network selector to exclude VPN" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-08-01 03:20:46 +00:00
50644b75b8
[Thread] fix upstream network selector to exclude VPN
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

Handa Wang   commited 2024-08-01 03:20:11 +00:00
4641f69608
[Thread] Make ThreadConfiguraiton a system API
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

Handa Wang   commited 2024-07-29 08:07:17 +00:00
5fc74b9fd8
[Thread] fix ServiceDiscoveryTest
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

Handa Wang   commited 2024-07-22 05:33:36 +00:00
cc6d43690b
[Thread] disable handling of airplane mode
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

Kangping Dong   commited 2024-07-15 15:48:15 +08:00
14da81bc17
Merge "[Thread] add config_thread_mdns_vendor_specific_txts" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-07-10 11:03:52 +00:00
9365e728e5
Merge "Revert "[Thread] post broacast receivers on the handler thread"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-07-10 09:43:16 +00:00
4866872a4d
[Thread] add config_thread_mdns_vendor_specific_txts
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

Kangping Dong   commited 2024-07-10 17:36:13 +08:00
29918c1d45
Revert "[Thread] post broacast receivers on the handler thread"
This reverts commit f8aaac0dd0.

Reason for revert: see b/350586929

Change-Id: I34f3a87664992e5324f89bcf49e56707d0143743

Kangping Dong   authored and   Gerrit Code Review   commited 2024-07-10 08:45:09 +00:00
65b4f5fa53
Merge "Thread: fill in ticks in active timestamp" into main
Yakun Xu   authored and   Gerrit Code Review   commited 2024-06-26 09:33:38 +00:00
4355dae9d8
Thread: fill in ticks in active timestamp
This commit fills in the ticks of active timestamp of randomly generated
dataset as defined in Thread spec.

Bug: 347838683
Change-Id: I5d8ba3ca7728e1890996fdd64198f7bc90bfb1fa

Yakun Xu   commited 2024-06-26 15:56:57 +08:00
e2ab96f3c7
Merge changes from topic "thread-configuration-api" into main
* changes:
  [Thread] support ThreadConfiguration API at ThreadNetworkControllerService
  [Thread] add support for configuration at ThreadNetworkController

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-06-24 10:03:18 +00:00
bc9c0e2b03
[Thread] support ThreadConfiguration API at ThreadNetworkControllerService
Bug: 342519412
Test: atest CtsThreadNetworkTestCases

Change-Id: I7b84a64d24e513bd6ba07bb26e3801b72c250810

Handa Wang   commited 2024-06-24 07:50:37 +00:00
4688910810
[Thread] add support for configuration at ThreadNetworkController
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

Handa Wang   commited 2024-06-24 07:50:34 +00:00
7520abf333
[Thread] post broacast receivers on the handler thread
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

Kangping Dong   commited 2024-06-24 11:52:14 +08:00
f8aaac0dd0
Merge "[Thread] add annotations for unit test NsdPublisherTest" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-06-18 06:45:16 +00:00
8e53836647
Merge "[Thread] reduce JNI code for setting up the ICMPv6 socket" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-06-18 05:03:15 +00:00
5637480c2c
[Thread] reduce JNI code for setting up the ICMPv6 socket
Bug: 316103631
Test: atest ThreadNetworkIntegrationTests

Change-Id: I64a0cb22d4ed2208328123d8dace3463a92af01e

Handa Wang   commited 2024-06-18 02:40:36 +00:00
0348cbe874
[Thread] add annotations for unit test NsdPublisherTest
Change-Id: Ic4e12b21bb888f0e4f892e9a368a64d769120cc1
Test: atest NsdPublisherTest

Handa Wang   commited 2024-06-18 00:51:03 +00:00
89c32ea0c8
Merge "[Thread] add the "vgh" TXT entry" into main am: 7ff092e3d1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3109107

Change-Id: I08858370a5fe7fc00519efc79180bbdc8d3fdc3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-06-12 18:27:23 +00:00
a00548da3d
[Thread] add the "vgh" TXT entry
Allows vendors to specify whether the Thread network is managed by
Google or not.

Bug: 343671003

Change-Id: Ie4d4050add0485643ea3eff0c576868b086f848c

Kangping Dong   commited 2024-06-12 23:19:34 +08:00
151275359f
Merge "[Thread] add public newbie guide" into main am: 53f4a29816
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3007440

Change-Id: I9ed4dd54e606b30e865b5d8b1764a9a76c9c924c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-06-07 02:53:34 +00:00
43b971e2e9