- Jan 10, 2024
-
-
Junyu Lai authored
-
Junyu Lai authored
This change includes: 1. Refactor the logic in Tethering#dump into utils class. 2. Move the utils class to a common place which could be referenced from other sub-modules. 3. Add @MonitorThreadLeak annotation to enforce there is no thread leak problem. Test: atest FrameworksNetTests NetworkStaticLibTests Test: atest ConnectivityCoverageTests:com.android.networkstack.tethering.TetheringTest#testDumpTetheringLog Test: adb shell dumpsys tethering (with hardcoded exception) Fix: 312669345 Change-Id: Ia6fdfeeec2110afa0ec9e056e9db3843748845c3
-
- Jan 09, 2024
-
-
Treehugger Robot authored
-
Kangping Dong authored
-
Kangping Dong authored
Define this flag for guarding UserManager#DISALLOW_THREAD_NETWORK Bug: 307679182 Change-Id: I69c578d76f3aac250bb733aac74754c127ae453b
-
Kangping Dong authored
This is not required for code in the mainline module since the flag infra is not supported for mainline. But we will need to write code in UserManager and it needs to be guarded by new Thread flags. Note that Merged-In is added to skip merging this CL into the udc-mainline-prod branch because trunk stable flagging is not supported there Bug: 307679182 Test: m Merged-In: I88c993680976d2e10d672bfdbf45119f2db13868 Change-Id: Id53fa3e7c9592b04f37f4cbd7dcd0499859e59ed
-
Handa Wang authored
Currently requestThreadNetwork is called in registerThreadNetwork. This creates a new NetworkCallback for Thread every time when Thread is turned on. We'd better just use one callback to avoid potential issues. Bug: 319179354 Change-Id: I96bad351f089b32a9acd919dea2e2b6b2aea68d2
-
- Jan 08, 2024
-
-
Kangping Dong authored
-
Kangping Dong authored
We need to do initialization work and start OT daemon when system_server boots. But the initialize() is called at the phase PHASE_BOOT_COMPLETED which is too late as Apps (e.g. Google Play Services) can be started before this phase. This commit changes to start the Thread service earlier at the phase PHASE_SYSTEM_SERVICES_READY. Other services such as Wi-Fi, Bluetooth, Ethernet and Nearby all starts / initializes at this phase. This commit resolves comment aosp/2737373/comment/d65b9446_8a08117c Bug: 318787467 Test: atest CtsThreadNetworkTestCases Change-Id: I7b7b8551b9114cbf07f995b64316c7b420d868b6
-
- Jan 05, 2024
-
-
Ken Chen authored
Address comments from android-api-council review. Bug: 310992535 Change-Id: I722725bd3d3a3df1687721175e9434efae9da37a Test: presubmit
-
Natasha Lee authored
-
Remi NGUYEN VAN authored
The cell network may reconnect on carrier config change, so a cell network requested before that may be disconnected after the change. Only request the cell network after the carrier config change, so the network connected after the change is used for the test. Bug: 316154796 Test: atest Change-Id: Id8cd49ae352fd7899cb45efecd5ccfd760a7b1eb
-
- Jan 04, 2024
-
-
Kangping Dong authored
-
Kangping Dong authored
Test: atest CtsThreadNetworkTestCases Change-Id: Id7c52532988048e4473591092ac60eb66b1b7bcb
-
Treehugger Robot authored
* changes: Make getProviderIfaceStats return Entry Return Entry from TrafficStats JNI
-
Junyu Lai authored
This refactoring makes the method return Entry for follow-up changes to perform arithmetic operations on them easily. This change also removes error handling when the type is unsupported when calling getProviderIfaceStats because it cannot happen in practice. Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest Bug: N/A Change-Id: Id26a24c80bb87c399972ef8c3abf16e0f4719cb1
-
- Jan 03, 2024
-
-
Spandan Das authored
-
Kangping Dong authored
-
Yang Sun authored
The ThreadPersistentSetting class can be used to read/store key value pairs in ThreadPersistentSetting.xml file. Bug: 299243765 Test: atest ThreadNetworkUnitTests:com.android.server.thread.ThreadPersistentSettingTest Change-Id: I564ce8373e6af8f5cdf066a579bec46bfffecb72
-
Kangping Dong authored
-
Zhanglong Xia authored
Bug: b/309357909 Test: Run `atest ThreadNetworkUnitTests`. Change-Id: I51c297a5c30fb114a6e3fb8b54cdbfef142001b3
-
Kangping Dong authored
Adds the Thread service unit test skeleton and make the services testable. Initially, a few trivial unit tests for existing APIs are added in ThreadNetworkControllerServiceTest.java, and more tests will be added in separate CLs later. Bug: 317555104 Change-Id: I7b9e5f3663493d8da2448568de792e4272ee1df6
-
Junyu Lai authored
This is no-op refactoring which returns [tx|rx][Bytes|Packets] to the service instead of passing type to JNI and return only 1 value. This is needed for the follow-up changes to caching values in a row in the service side. This change also remove unused JNI methods. Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest Bug: N/A Change-Id: I3b6ac97e6a1bff49cffe6153ffc2618f37a9deb4
-
Zhanglong Xia authored
-
Yuyang Huang authored
-
Zhanglong Xia authored
Bug: b/309357909 Test: Run `atest ThreadNetworkUnitTests`. Change-Id: I087cc0fc2b6c21fd9d3d4607f30c194214aeb37e
-
Zhanglong Xia authored
-
Zhanglong Xia authored
-
- Jan 02, 2024
-
-
Rex Hoffman authored
This commented out line references the old robolectric ("Robolectric_all-target") which is being replaced by Robolectric_all-target_upstream Bug: 314757990 Test: none, this is simply removing a commented out dep. Flag: NA Change-Id: I25eed6cef457bada06289656745ca5b5286bb467
-
Zhanglong Xia authored
This CL adds resource overlay support to allow developers to change the default configuration of using the location country code. Bug: b/311324956 Test: Set the resource overlay in cuttlefish, check the default configuration via the command `dumpsys thread_network`. Change-Id: Ide853975e8244f06a382b2eda4844e030539b95d
-
Zhanglong Xia authored
This CL selects the Thread country code from location country code. If the location country code is not avaliable, the country code `WW` will be selected as the default Thread country code. This CL also adds Shell commands for developers to override the Thread country code for testing. Bug: b/309357909 Test: Run `atest ThreadNetworkUnitTests`. Change-Id: Id87c293005f0e75922a72854b40c41837b74397f
-
Yuyang Huang authored
Test: TH Change-Id: Idc661b6a2ca4ca25ea06e30cae87967a37e9c3fc
-
- Dec 29, 2023
-
-
Zhanglong Xia authored
-
- Dec 28, 2023
-
-
Treehugger Robot authored
-
Kangping Dong authored
* changes: [Thread] use Context#enforceCallingOrSelfPermission [Thread] make InfraInterfaceController mockable
-
Kangping Dong authored
Context#enforceCallingPermission always throws SecurityException if we are not processing a Binder IPC. This specifically doesn't work with unit tests where the service APIs are called with mocked Binder interfaces. Bug: 317555104 Change-Id: I50be68487fb53907dbb1e3da7815fdf305047481
-
Remi NGUYEN VAN authored
-
- Dec 27, 2023
-
-
Karl Shaffer authored
-
Kangping Dong authored
It's generally discouraged to mock a static method, so this commit changes InfraInterfaceController#createIcmp6Socket to non-static method and inject InfraInterfaceController into ThreadNetworkControllerService as an external dependency. Bug: 317555104 Change-Id: I6f88c02858279223684c781dc065a9bf84ae15ab
-
Ken Chen authored
NsdService switched from Netd native solution to Java solution on Android U. MDNS service provided by Netd will be removed from Android V. 1. Stop registering native mdns service from V. 2. Stop startDaemon() in NsdManager from V. 3. As a double safety, return early in NsdService methods that call the native mdns service when platform version is V+. 4. Modify NsdManagerTest to cover V+ behavior. Bug: 298594687 Test: Build. Presubmit. Change-Id: Ifdac8f7a44aa57d93d453ba482ec473a2b531452
-