Commit graph

95,463 commits

Message SHA1
Make the subscriptionIds and allowedUids public
This CL allows everyone to see the subscriptionIds and the network owner
to see the allowedUids from the NetworkCapabilities.

Bug: 324357121
Test: atest ConnectivityManagerTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I91e360827d2a9a64625f1d6ae0f808aa327c7d22

Ying Xu   commited 2024-03-04 14:51:20 -08:00
611b80456a
Merge "Udpate setNetworkSpecifier to support Satellite Transport." into main
Nagendra Prasad Nagarle Basavaraju   authored and   Gerrit Code Review   commited 2024-02-27 09:28:55 +00:00
8c0f67820d
Merge "[Test] multicast forwarding from LLA/MLA address test" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-02-27 01:31:54 +00:00
bd447266b9
Merge "[Test] Thread multicast routing E2E test" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-02-27 01:29:34 +00:00
47d8b2ed38
Merge "SatelliteAccessController enhancements to handle Multiple User" into main
Nagendra Prasad Nagarle Basavaraju   authored and   Gerrit Code Review   commited 2024-02-26 16:44:08 +00:00
63ff28ed54
Udpate setNetworkSpecifier to support Satellite Transport.
- Allow adding two non test transports i.e. satellite and cellular
  at setNetworkSpecifier, to receive network requests related to
  satellite transport capabilities

Bug: 324347502
Test: atest FrameworksNetTests
Change-Id: I03a3d701e214792184bacfe5b5b59cdef61d555e

Nagendra Prasad Nagarle Basavaraju   commited 2024-02-26 11:24:19 +00:00
a8a74e2ccc
SatelliteAccessController enhancements to handle Multiple User
- onRoleHoldersChanged & onRoleSmsChanged handling for multiple Users
- Different satelliteNetworkFallbackUids cache for each user.
- Merging uid of each user cache and sending for Multi Layer request
- check SATELLITE_COMMUNICATION permission based package manager
  context at different UserHandle

Bug: 324347502
Test: atest FrameworksNetTests
Change-Id: If98524ec7846909d70db3e962e2a11c912768551

Nagendra Prasad Nagarle Basavaraju   commited 2024-02-26 11:24:01 +00:00
f63e6d8e67
[Thread] pre-grant all permissions for ThreadNetworkControllerServiceTest
Existing ThreadNetworkControllerService tests are using RunAsShell to
grant the permissions for indivitual APIs. Given the permission checks
are tested in the CTS tests, this is not very useful with the overhead
of complicating the testing code. Instead, this CL grants all the
permissions in setUp() with spy-ed Context.

This commit also fixes the issue in b/326793058 that the tests doesn't
run on a U device where the THREAD_NETWORK_PRIVILEGED permission doesn't
exist.

Bug: 326793058
Test: m ThreadNetworkUnitTests
Change-Id: I477cf30d737969ccf12180eae48d3b8fd6ed4a51

Kangping Dong   commited 2024-02-26 17:15:07 +08:00
a3c94d5273
Merge "Revert "Re-enable the tests for background restrictions"" into main
Suprabh Shukla   authored and   Gerrit Code Review   commited 2024-02-26 08:11:07 +00:00
ced8412a19
Merge "Correct the method used for permission check" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-02-26 06:02:57 +00:00
c91b22be98
Merge "Add methods to support verifying captive portal launch" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-02-26 06:02:42 +00:00
3023965cf8
[Test] multicast forwarding from LLA/MLA address test
Added E2E test cases to verify that packets from Thread network with
link-local/mesh-local source address to multicast group with scope
larger than realm-local are not forwarded to infra link.

Bug: 325770316

Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest
Change-Id: I77cb8dbc43d0a2d6936a2a4db45e9dea541ea3c0

Yang Sun   commited 2024-02-26 13:25:28 +08:00
12074b5fad
[Test] Thread multicast routing E2E test
Added E2E test for Thread multicast routing.

Bug: 320616891

Test: atest ThreadNetworkIntegrationTests:android.net.thread.BorderRoutingTest

Change-Id: Icbaa9f6645080bd1a0a95ddc7902b9a468dd0088

Yang Sun   commited 2024-02-26 13:22:51 +08:00
e056b9a188
Correct the method used for permission check
The hasNetworkStackPermission() method does not enfore the
permission check. It should be replaced with
enforceNetworkStackPermission().

Bug: 325984919
Test: atest FrameworksNetTests
Change-Id: I9ad0b47190dbc9afd2ee6f5dfc21a4935036733a

Chiachang Wang   commited 2024-02-26 03:08:22 +00:00
ac162f2272
Add methods to support verifying captive portal launch
Test: atest FrameworksNetTests
Bug: 325984919
Change-Id: If76a216eca8527b4a7a7f7776d09f66e62daea06

Chiachang Wang   commited 2024-02-26 03:08:22 +00:00
82b6839c02
Merge "Select Thread channel from preferred or supported channel mask" into main
Zhanglong Xia   authored and   Gerrit Code Review   commited 2024-02-26 02:56:30 +00:00
427c307ca2
Merge "Bump the required SDK level to U for isUidNetworkingBlocked" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2024-02-26 02:04:13 +00:00
b5391d27cc
Revert "Re-enable the tests for background restrictions"
Revert submission 2970571-turn-on-network-restrictions

Reason for revert: b/326370901

Reverted changes: /q/submissionid:2970571-turn-on-network-restrictions

Change-Id: I6d38da59ac979af3a600ba695de2890e2d4c7bb0

Suprabh Shukla   authored and   Gerrit Code Review   commited 2024-02-23 21:48:20 +00:00
36a8ecbb05
Merge "Support TrafficStatsRateLimitCache" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2024-02-23 07:36:51 +00:00
52f6a8a28e
Select Thread channel from preferred or supported channel mask
The API `createRandomizedDataset()` randomly selects a channel
between channel 11 and 26. But not all countries support channels
between 11 and 26.

This CL selects random channel from  the preferred channel mask if
the preferred channel mask is not 0, otherwise choose one from the
supported channel mask.

Bug:b/308310823
Test: atest ThreadNetworkUnitTests && atest CtsThreadNetworkTestCases

Change-Id: I6add3edc7e4fa888c46b57c4463ab18e0aa84e80

Zhanglong Xia   commited 2024-02-23 11:04:27 +08:00
d800ee41bf
Merge changes I5a88e8ae,I7ffa2df4 into main
* changes:
  Add CTS test for Multipacket Known-Answer Suppression
  Add CTS test for Known-Answer Suppression

Paul Hu   authored and   Gerrit Code Review   commited 2024-02-22 13:06:22 +00:00
df7fd82c28
Merge "Move Nearby flags to common and add specify it in java_sdk_library" into main
Yahav Nussbaum   authored and   Gerrit Code Review   commited 2024-02-22 12:37:57 +00:00
c92872e3d5
Bump the required SDK level to U for isUidNetworkingBlocked
This change is a follow-up from aosp/2970991. The kernel bug
can trigger crashes on some T devices. Therefore, bumping the
required API level is necessary.
No CTS modification since the check doesn't exist in
pre-U CTS releases.

Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
Bug: 326143935
Change-Id: I63796f25315ee9f966dd5bf0afd2240b1ed456e1

Junyu Lai   commited 2024-02-22 17:34:57 +08:00
934d483e4b
Move Nearby flags to common and add specify it in java_sdk_library
Bug: 324993608
Test: TH
Change-Id: I1dc79353e9bae3d977db88e572e871cd459fc7fc

Yahav Nussbaum   commited 2024-02-22 06:49:15 +00:00
259be7bd4e
Merge "[Thread] remove OT_ERROR_DETACHED" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-02-22 06:29:26 +00:00
f54f07dbb8
Merge changes Id512ba6b,Ib57a4a93 into main
* changes:
  Add start activity method override method
  Add permission control methods override

Chiachang Wang   authored and   Gerrit Code Review   commited 2024-02-22 06:23:44 +00:00
f769efe3e4
Merge "[Thread] convert OT_ERROR_INVALID_STATE to INTERNAL_ERROR" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-02-22 06:22:46 +00:00
0d131ca017
[Thread] remove OT_ERROR_DETACHED
remove handling of this error code given it's not returned from
IOtDaemon APIs.

Test: atest CtsThreadNetworkTestCases
Change-Id: Id1d9b9d0ad45b7242e7c1d081b05ac51cf928603

Kangping Dong   commited 2024-02-22 11:37:53 +08:00
139185cc32
[Thread] convert OT_ERROR_INVALID_STATE to INTERNAL_ERROR
In most cases, OT_ERROR_INVALID_STATE in ot-daemon indicates an internal
error. OtDaemonServer should actually maintain the state to make sure no
OT_ERROR_INVALID_STATE error can be returned.

Test: atest CtsThreadNetworkTestCases
Change-Id: I9dd6667548048873bf0c5b8eb85d929dfcaef997

Kangping Dong   commited 2024-02-22 11:34:16 +08:00
9a7619cd99
Add start activity method override method
Add helper methods to support verifying startActivityAsUser().

Test: atest FrameworksNetTests
Bug: 325984919
Change-Id: Id512ba6b1181974dde799ece64b263ce7a2f88f7

Chiachang Wang   commited 2024-02-22 02:35:44 +00:00
6b95876228
Add permission control methods override
Bug: 325984919
Test: atest FrameworksNetTests
Change-Id: Ib57a4a936538295a6df10ae7e334bc969ea455d1

Chiachang Wang   commited 2024-02-22 01:36:39 +00:00
692727b84e
[Thread] add aconfig_declarations for Thread module API flags
This is required to included Thread module APIs in DP2 release.
See ag/26286387

merged-in is used to stop the CL from being merged into U branches

Bug: 325886480
Merged-In: I1eed7982b40d28947aa3f9575c568eac325dc832
Merged-In: I79be1b48058ce6fb08149e18cdd7a5f5b0762769
Change-Id: I79be1b48058ce6fb08149e18cdd7a5f5b0762769

Kangping Dong   commited 2024-02-21 14:56:42 +00:00
ce69cd9459
Merge "[Thread] add MainlineModuleController for ThreadNetwotkUnitTests" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-02-21 12:52:37 +00:00
6a3aa142d6
Merge "Flag declaration file for Nearby" into main
Yahav Nussbaum   authored and   Gerrit Code Review   commited 2024-02-21 10:20:11 +00:00
1655caeada
Support TrafficStatsRateLimitCache
This is used in follow-up changes to rate-limit TrafficStats
get* API calls.

Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.TrafficStatsRateLimitCacheTest
Bug: N/A
Change-Id: I91bc71dda3a1b7c0b5525278b3c04d12492972fa

Junyu Lai   commited 2024-02-21 17:42:37 +08:00
b5ee82177b
[Thread] add MainlineModuleController for ThreadNetwotkUnitTests
Per comment in https://android-review.git.corp.google.com/c/platform/test/mts/+/2930711/comment/a88f14b1_a2fb9841/

Bug: 322142548
Change-Id: Id87c9f20be31cbead2062c08addc5995df143896

Kangping Dong   commited 2024-02-21 09:15:13 +00:00
9d2f1e8e9e
Merge "Use custom defined DNS/HTTP port" into main
Jimi Chen   authored and   Gerrit Code Review   commited 2024-02-21 09:03:47 +00:00
48f8d1892f
Re-enable the tests for background restrictions
The feature is now turned on so the tests can be re-enabled.
This reverts commit 6266342327.

Test: atest CtsHostsideNetworkTests

Bug: 304347838
Change-Id: I85f462e75931240bde8b0dd956c0011ec8435b8f

Suprabh Shukla   commited 2024-02-20 14:12:41 -08:00
375f6bba81
Merge "Store the SubscriptionId together with the Carrier UID" into main
Ying Xu   authored and   Gerrit Code Review   commited 2024-02-20 21:46:49 +00:00
9a5aaaccf6
Store the SubscriptionId together with the Carrier UID
Always store the corresponding SubscriptionId together with the Carrier
uid so that when the carrier loses the Privilege, both the uid and
SubscriptionID will be used in the onCarrierPrivilegesLost callback

Bug: 324357121
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.CarrierPrivilegeAuthenticatorTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I28e51c583261a67d4441c6f825ade6781b862ee4

Ying Xu   commited 2024-02-20 08:58:31 -08:00
0d06b9460a
Merge "Use async private DNS resolution for privdns CTS" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2024-02-20 11:46:57 +00:00
cc2e593d7b
Use custom defined DNS/HTTP port
Refactor the test case to support listen custom DNS/HTTP port.
Avoid binding system restricted port (<1024).

Bug: 322113686
Test: atest NetworkStackIntegrationTests:android.net.NetworkStatsIntegrationTest
Change-Id: I5d3b966cdadc9321ca2ee0d04a5b8f71ee79bd8a

Jimi Chen   commited 2024-02-20 08:08:17 +00:00
45ac04442f
[Thread] disable Thread when user restriction is set
This commit follows the guideline in go/ae-v-thread-admin-control that
Thread radio should be disabled when the user restriction is set and
nobody can enable Thread again (it fails with
ERROR_FAILED_PRECONDIFITION).

This commit adds only unit tests, E2E CTS tests are tracked in b/319079428

Bug: 319077876
Change-Id: I8981aa9e71948c64ee79701427ac794880826327

Kangping Dong   commited 2024-02-20 15:56:42 +08:00
505b5ce45b
Add sdk_version to test libraries
If sdk_version is empty, by default the library will be built against
the implementation of the framework jars. There are on going project to
automatically repackaging flag libraries in the libray which is built
direactly against the implementation of the framework jars.

This change set the right sdk_version for the testing library.

Bug: 310504781
Test: atest jarjar-rules-generator-test and CI
Change-Id: I24d8dc47f7ed83f0b84c632d24396e2bdf932424

Zhi Dou   commited 2024-02-19 18:36:40 +00:00
e521ae306a
Merge "[mdns] fix the logic of finding the existing service" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-02-19 11:02:16 +00:00
4c0b2f6c63
Merge "Add a test case that a Border Router sends a UDP message to Thread device" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-02-19 10:25:46 +00:00
b206809a64
Merge "Update flags.aconfig to follow the current APIs" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-02-19 09:21:54 +00:00
1ec06555e1
Update flags.aconfig to follow the current APIs
This CL also specifies aconfig_declaration module in java_sdk_library
register_nsd_offload_engine will be moved to the platform flags.aconfig
in the followup CL.

Test: TH
Change-Id: I430a5f0b1e1ef2e3394cf6aa8efebbd46da41765

Motomu Utsumi   commited 2024-02-19 06:58:35 +00:00
52f294cbc4
[mdns] fix the logic of finding the existing service
When adding a service, the MdnsRecordRepository finds the
existing service solely by service name, which is wrong. it should check
both the service name and the service type.

Bug: 325862182

Change-Id: I72c6837d0dfb41fc9b2d7763e18b3f5415f8c0d9

Handa Wang   commited 2024-02-19 06:40:59 +00:00
10b99ce48f
Add a test case that a Border Router sends a UDP message to Thread device
This test case lets the BR send a UDP message to Thread device using
socket API and verify the message is received on the Thread device via
ot-ctl udp command.

For now this only verifies the direction BR -> ED because the other
direction ED -> BR is depending on platform UDP feature which is not
enabled yet.

Bug: 321168973
Test:  atest ThreadNetworkIntegrationTests:BorderRoutingTest#unicastRouting_borderRouterSendsUdpToThreadDevice_datagramReceived

Change-Id: I590583dd818f3d72dec41184e5427a8b08f842bb

Handa Wang   commited 2024-02-19 03:24:38 +00:00
b5c6ac2fe7