Commit graph android_packages_modules_Co.../thread
Message SHA1
[Thread] fix the test util of setNat64EnabledAndWait to apply old config
Bug: 356770473
Change-Id: I6d1e3d6acc9a101b3e783ab4493ed25a3aa732a1

Yang Sun   commited 2024-10-21 08:45:59 +00:00
ee4ab96116
[Thread] use setConfiguration API in NAT64 tests
Bug: 356770473

Change-Id: I98c80de24cbaaa7206ddbd2bf62350066c998ba5

Handa Wang   commited 2024-10-21 06:04:09 +00:00
52c72a11bf
[Thread] Let TunInterfaceController.getLinkProperties() return a copy of LinkProperties
This CL avoids accidental edits to the `mLinkProperties` field of TunInterfaceController.

Change-Id: Ie696412c0593cece2fddcd6bc097db2829ef16e7

Handa Wang   commited 2024-10-21 02:51:03 +00:00
380e8244a5
Merge "[Thread] introduce ThreadNetworkControllerService#initializeInternal()" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-10-18 10:44:28 +00:00
2b5f3a2778
Merge "Add test for meshcop service state bit for epskc." into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-10-18 09:53:11 +00:00
2c2e1cce3a
[Thread] introduce ThreadNetworkControllerService#initializeInternal()
The size of the lambda in ThreadNetworkControllerService#initialize() is getting larger so we introduce #initializeInternal() for better readability.

Change-Id: Idd7cb57e5ed03d27210c1199e03bfab51dbd1215

Handa Wang   commited 2024-10-18 09:35:54 +00:00
2801791773
Add test for meshcop service state bit for epskc.
Bug: 373749923

Test: atest CtsThreadNetworkTestCases

Change-Id: I7e8661eb447f4055dce19a0b16857324d7cd9b18

Yang Sun   commited 2024-10-18 08:00:54 +00:00
a9efc24ade
[Thread] add CLI commands for getting/setting config
Bug: 364237115

Change-Id: Ice42d7d02cfefd733042282939635502c259d9d5

Handa Wang   commited 2024-10-17 07:40:42 +00:00
7eb1bbd369
Merge "[Thread] add configuration methods in ThreadNetworkControllerWrapper" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-10-17 05:37:33 +00:00
fe6dedde08
[Thread] add configuration methods in ThreadNetworkControllerWrapper
Change-Id: I56b4ca76e7f62d924f99527b36eac24ed151c53b

Handa Wang   commited 2024-10-16 14:55:19 +00:00
1c7d51a743
Merge "Remove the check for epskc flag value at runtime." into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-10-16 01:49:52 +00:00
f329d7ed2d
Remove the check for epskc flag value at runtime.
This blocks local testing as the flag is read-only.

Change-Id: I891ef2d61dbb1ecccde7b89081899afb7155dd2f

Yang Sun   commited 2024-10-15 07:08:11 +00:00
eab97a0552
Rename TapPacketReader to PollPacketReader for broader applicability
* Renamed TapPacketReader to PollPacketReader to better reflect its
  functionality beyond TAP interface interaction.
* The class includes general logic for polling and sending packets to
  file descriptors, making it suitable for wider use cases.

Test: TH
Change-Id: Icdf9a9d7ef6f49b589ed9cdbd05159ab95e7e5d9

Yuyang Huang   commited 2024-10-15 13:42:05 +09:00
eb3c631b89
Merge changes Ie2834546,I3a1570dc into main
* changes:
  [demoapp] make the Thread Network Settings page scrollable
  [demoapp] Add ephemeral key buttons and texts

Yang Sun   authored and   Gerrit Code Review   commited 2024-10-14 05:27:02 +00:00
3f5e199898
[demoapp] make the Thread Network Settings page scrollable
The page is made scrollable, and moved epskc related text/buttons to the
bottom of the page.

A screenshot of the screen scrolled down:
https://screenshot.googleplex.com/Bx2dFHu3SqpbEri

Bug: 372820898
Change-Id: Ie28345463275a177a3fbf272339912b9ea56e38f

Yang Sun   commited 2024-10-14 02:41:43 +00:00
85f93ed38c
[Thread] add unit test cases for Configuration API at
ThreadNetworkController

Bug: 368456504
Change-Id: I67b57f658c35b2b6e2045903d035d0f925b9b333

Handa Wang   commited 2024-10-14 02:34:49 +00:00
9a302c1e7a
[demoapp] Add ephemeral key buttons and texts
A screenshot of ephemeral key enabled: https://screenshot.googleplex.com/BpUcYFkbuRvzirF

Bug: 372820898
Change-Id: I3a1570dc546a90a997d15428a3936967c1df3041

Yang Sun   commited 2024-10-14 02:11:26 +00:00
f1930fdb4f
Merge "Change OtDaemonState ephemeralKeyExpiryMillis to ephemeralKeyLifetimeMillis" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-10-11 01:19:01 +00:00
adee3295ff
Merge "[Thread] fix the issue that border routing is not available after ot-daemon restarts" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-10-10 15:33:01 +00:00
3e4eaf8c80
[Thread] fix the issue that border routing is not available after
ot-daemon restarts

This CL tries to fix issue by removing error-prone shortcircuit checks.
The checks skip configuring the ot-daemon if they think the new state
is equal to the old state. However, the old state mainainted in
ThreadNetworkControllerService may be stale which causes issues.

Bug: 372592886
Test: atest ThreadNetworkIntegrationTests

Change-Id: Icab25cf094f8bf33832b4097ab8ee77b54badc6b

Handa Wang   commited 2024-10-10 14:21:58 +00:00
485a7f1849
Merge changes from topic "thread-set-configuration" into main
* changes:
  [Thread] make ThreadNetworkController#setConfiguration a system API
  [Thread] implement the ThreadNetworkController#setConfiguration at service

Handa Wang   authored and   Gerrit Code Review   commited 2024-10-10 10:37:47 +00:00
fd2a145513
Change OtDaemonState ephemeralKeyExpiryMillis to ephemeralKeyLifetimeMillis
Bug: 372598146
Test: atest CtsThreadNetworkTestCases

Change-Id: I634ca0c22b5d80411df2b53493659c27ea07d2f2

Yang Sun   commited 2024-10-10 06:54:40 +00:00
fe0fb3081e
[Thread] make ThreadNetworkController#setConfiguration a system API
This CL turns setConfiguration into a system API, including the
ThreadConfiguration#Builder
and the #setNat64Enabled method.

Bug: 368456504

Change-Id: I0ff2ed81271dcceea295d169a46a02f05aeda5d6

Handa Wang   commited 2024-10-10 05:36:11 +00:00
651bfdaaf7
[Thread] implement the ThreadNetworkController#setConfiguration at
service

This CL implements the ThreadNetworkController#setConfiguration. When
the ThreadNetworkControllerService receives this call, the configuration
is passed to ot-daemon and triggers according OT APIs. On success, the
configuration is persisted to the local storage and triggers
OutcomeReceiver#onSuccess. On failure, it triggers
OutcomeReceiver#onError.

Bug: 368456504

Change-Id: I570ec3fead204cd3b6c05629ef409967245350b8

Handa Wang   commited 2024-10-10 05:36:06 +00:00
ed15725987
[javadoc] add missing space
Bug: 348323500
Test: presubmit

Change-Id: Iacad7bd2537108425cc9dedcfdd3eeef7f9765b8

Yang Sun   commited 2024-10-08 06:01:05 +00:00
34e9836b26
[Thread] Add unit test for ephemeral key API
Bug: 348323600

Test: atest ThreadNetworkUnitTests
Change-Id: I8148b20b02010d57020b2d5d2eb9a3e79e68b10f

Yang Sun   commited 2024-09-29 02:35:51 +00:00
018f163cc9
[Thread] support ephemeral key API in ThreadNetworkControllerService
Bug: 348323600

Test: atest CtsThreadNetworkTestCases
Change-Id: Ic8cae057f1bc8e631e47cfc1afba59b09bf0b35f

Yang Sun   commited 2024-09-29 02:35:51 +00:00
a591d0432b
[Thread][API] add API for ephemeral key.
This CL adds the API for starting/stopping the ephemeral key mode, and
subscribing to the ephemeral key state changes.

Ephemeral key mode is started with a limit amount of time to allow
Thread credential sharing.

Bug: 348323500
Test: atest CtsThreadNetworkTestCases
Change-Id: I540c88ec4668291358fbe87a678d8f9d31a67e54

Yang Sun   commited 2024-09-29 02:35:44 +00:00
b8aa8bb47f
Merge "[Thread] support discovering NAT64 prefix from AIL" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-09-23 03:58:57 +00:00
5f9a3d042e
[Thread] support discovering NAT64 prefix from AIL
Bug: 357479886

Change-Id: I8dfd96a0ba3e927ed4cbc8ceecb18652adf98964

Handa Wang   commited 2024-09-23 02:35:07 +00:00
b47c325907
Merge "[Thread] refactor setInfraLinkState" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-20 09:51:58 +00:00
adc778d038
Merge "Allow ot-ctl command under ADB Thread Network Service : support of non-interactive mode" into main
Yang Song   authored and   Gerrit Code Review   commited 2024-09-20 07:32:01 +00:00
2d17714c24
[Thread] refactor setInfraLinkState
This CL integrates the refactoring of aosp/3264051.

Bug: 365892457
Change-Id: I77788c06db02abbf2275fda3015b0f3fa63920e0

Handa Wang   commited 2024-09-20 06:34:51 +00:00
e24b215bf2
Merge "Let NsdPublisher pass the interface index when a service is resolved." into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-09-20 05:13:43 +00:00
631ded17fc
Allow ot-ctl command under ADB Thread Network Service : support of non-interactive mode
Bug: 351721329

Test: atest ThreadNetworkUnitTests

Change-Id: Id7443c24ea380d200e73cca4ead2284249f2052f

Yang Song   commited 2024-09-20 03:58:14 +00:00
ffceaae1b8
Let NsdPublisher pass the interface index when a service is resolved.
The mapping from network to interface name is passed from
ThreadNetworkControllerService to NsdPublisher, so that NsdPublisher can
send interface index to mdns subscribers when a service is resolved.

Bug: 321883491

Test: presubmit
Change-Id: I401c38ba3fbc7b2a2de5cbc9ab1132c657518f32

Yang Sun   commited 2024-09-20 11:09:54 +08:00
9bf8e48c2a
Format the code in ThreadNetworkController.java
Change-Id: I3471f53396afb12768aa279a1ab059ffbfd8671e

Yang Sun   commited 2024-09-19 10:15:51 +00:00
75a6bf3958
Fix typo in RCP documentation
Change-Id: I65d405caa240ad70ca9640f1914a0ce243cf7e9f

Kangping Dong   commited 2024-09-19 02:38:36 +00:00
da59f47a57
Fix typo in "build-an-android-border-router.md"
Change-Id: I3d6c7632b8c5395fc9213607bd771b1809cc6fd1

Kangping Dong   commited 2024-09-19 02:22:00 +00:00
f286919f80
[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