Commit graph android_packages_modules_Co.../framework
Message SHA1
Fix isUidNetworkingBlocked for system uids
Update isUidNetworkingBlocked to return false for system uids regardless
of firewall chain status since this is an actual behavior

Bug: 328732146
Test: TH
Change-Id: Ic4760b927f51a1229e9af09c79b5261f85fe89d1

Motomu Utsumi   commited 2024-03-26 19:16:54 +09:00
cb448f5c78
Move isChainEnabled and getUidRule to BpfNetMapsUtils
This CL also adds @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
to NetworkStackBpfNetMaps

Bug: 328732146
Test: TH
Change-Id: Ifa4cffd046164405b8b49d2e2ee9f27240bec6fa

Motomu Utsumi   commited 2024-03-19 04:21:29 +00:00
2f79f58c06
Move isUidNetworkingBlocked to BpfNetMapsUtils
This is a preparation to add isUidNetworkingBlocked method to BpfNetMaps
without duplicating codes.

Bug: 328732146
Test: TH
Change-Id: I50a46931f6c80a1f4cfca5d9e78b2ab742a793f2

Motomu Utsumi   commited 2024-03-19 04:21:19 +00:00
bb35aa1947
Call getDataSaverEnabled from isUidNetworkingBlocked
This reduces unnecessary bpf map read

Bug: 328732146
Test: TH
Change-Id: I7652bee99c1d733bae38508d7d6092c90678dc42

Motomu Utsumi   commited 2024-03-19 04:20:54 +00:00
e1d536ba8a
Merge "Rename BpfNetMapsReader to NetworkStackBpfNetMaps" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-19 04:13:17 +00:00
7bfcd30e89
Rename BpfNetMapsReader to NetworkStackBpfNetMaps
BpfNetMapsReader is loaded to bootclasspath. So this class should not
contain unnecessary codes.
To make this clear, this CL renames to NetowrkStackBpfNetMaps and add
comments

Bug: 328732146
Test: TH
Change-Id: I557627c9fae087eb6119c2ae31d46526fa9e5d7e

Motomu Utsumi   commited 2024-03-19 04:12:29 +00:00
fc504042f6
Merge "Throw if isUidNetworkingBlocked is called below U" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-18 09:24:26 +00:00
5784191a76
Throw if isUidNetworkingBlocked is called below U
Test: TH
Fix: 329384918
Change-Id: I23139245ca91d29adf533d88551d1ea345488568

Junyu Lai   commited 2024-03-18 14:50:42 +08:00
7291d1172c
Merge "Remove DEFAULT_FORBIDDEN_CAPABILITIES from NetworkRequest" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-14 06:43:36 +00:00
8ee26e64be
Merge changes from topic "revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX" into main
* changes:
  Revert "cronet 121_0_6167_71: remove http_client_logging lib"
  Revert "[Cronet] Disable one of setURLStreamHandlerFactory test"

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-13 18:23:14 +00:00
d49669622b
Remove DEFAULT_FORBIDDEN_CAPABILITIES from NetworkRequest
aosp/2873154 disabled DEFAULT_FORBIDDEN_CAPABILITIES to avoid crash when
the module rolls back.
DEFAULT_FORBIDDEN_CAPABILITIES was introduced to avoid existing users
getting callback from local networks.
But aosp/2936050 fixed this issue by introducing compat flag.
So this CL cleans up DEFAULT_FORBIDDEN_CAPABILITIES code

Test: TH
Bug: 319212206
Change-Id: I125800cb3dd029f190056c8715ab9a741a83a234

Motomu Utsumi   commited 2024-03-13 12:11:13 +09:00
29ff998bb9
Merge "Add CompatChange for local network matching" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-13 02:34:57 +00:00
d2c103ea14
Revert "cronet 121_0_6167_71: remove http_client_logging lib"
Revert submission 2980591-cronet_121_0_6167_71

Reason for revert: Seems to be the cause for b/328855816

Reverted changes: /q/submissionid:2980591-cronet_121_0_6167_71

Change-Id: I8baddfcbc1926acf9d58130b2032b5acd921e4fa

Patrick Rohr   commited 2024-03-11 19:07:03 +00:00
dae7f8c4dc
Merge changes from topic "cronet_121_0_6167_71" into main
* changes:
  [Cronet] Disable one of setURLStreamHandlerFactory test
  cronet 121_0_6167_71: remove http_client_logging lib

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-08 10:08:20 +00:00
14d2e19e47
Add CompatChange for local network matching
Apps that target an SDK before V will not see networks with
NET_CAPABILITY_LOCAL_NETWORK unless they explicitly set this capability
in their network requests.

Bug: 319212206
Test: CSLocalAgentTests
Change-Id: I414b03dfea9a8aac83304c6be501f03d637739b4

Motomu Utsumi   commited 2024-03-04 17:50:27 +09:00
ad480e0c58
Merge "Remove unused library visibility" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-03-04 02:43:27 +00:00
2154e525b3
Merge "Move VpnManagerServiceTest and VpnTest to frameworks" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-03-01 00:58:31 +00:00
0df28d82be
Remove unused library visibility
This commit removes the unused library visibility.

The "frameworks/base/packages/Connectivity" folder is the
temporary folder for modulizing the connectivity codes. There is
no such need now.

Test: m
Change-Id: Ia2890fe64c1bc369fcb90be645263bc56c98a7b2

Chiachang Wang   commited 2024-03-01 00:57:52 +00:00
52d329642a
Move VpnManagerServiceTest and VpnTest to frameworks
These unit tests are closely tied to the source code in
frameworks/base and were incorrectly placed in the connectivity
module. Also update the libraries visibility that are used by
the tests.

Test: atest FrameworksNetTests
Change-Id: I196c33a8bd5b5cdb9d42aea381e900681ff6d25e

Chiachang Wang   commited 2024-02-29 07:48:02 +00:00
a5d9875823
Merge "Include structs lib in service-connectivity-pre-jarjar" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-02-29 03:16:28 +00:00
db67a80430
cronet 121_0_6167_71: remove http_client_logging lib
Cronet telemetry has been implemented in a more centralised version
in chromium and is not a different target anymore.
See b/311369704 for more details.

Test: atest NetHttpTests
Bug: b/322154153
Change-Id: I6d9a13b1ffc25b51ca0d2cbadd86b40b399f89ac

Chidera Olibie   commited 2024-02-28 10:20:08 +00:00
09f0d47b06
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
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
Include structs lib in service-connectivity-pre-jarjar
To use the java struct definitions for multicast routing in connectivity
service, a new lib is defined and included in
service-connectivity-pre-jarjar.

Bug: 323503345

Test: presubmit
Change-Id: I664602fd0fa0a5da136ea28fd3c4d9068c5b46ab

Yang Sun   commited 2024-02-26 17:28:04 +08:00
1c9fb59004
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
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
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
Update javadoc for NET_CAPABILITY_LOCAL_NETWORK API
Bug: 324326824
Test: TH
Change-Id: I6d5f9c27b2fc2f2290e27f63b933b9ccacfffa85

Motomu Utsumi   commited 2024-02-15 15:41:50 +09:00
4f956270f7
Make TetheringRequest parcelable
Make TetheringRequest parcelable so we can pass it via Wifi APIs and map
Soft AP state changes to the correct request.

Bug: 216524590
Test: build
Change-Id: I63a45b14e9abc288b353159dfdcbe96fde485cb7

Quang Anh Luong   commited 2024-02-15 10:15:05 +09:00
1252f7f428
Merge "Check whether kernel is for X86 via JNI" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-02-10 05:22:15 +00:00
ec3b193377
Check whether kernel is for X86 via JNI
Bug: 319532485
Test: Verified the return value on husky (arm)
      and cuttlefish (x86_64)
Change-Id: I8fd53b0f137ad701e051644eafaa12c2a5cf3e7f

Yan Yan   commited 2024-02-09 19:13:07 +00:00
02f6124b05
add TRANSPORT_SATELLITE to NetworkCapabilities
This commit also updates to use V14 dnsresolver APIs which was V13.

Bug: 320514105
Test: m & atest FrameworksNetTests
Change-Id: I6e92f4d99e0eba3b5d1d5e45bf11e5e945ea43f1

Nagendra Prasad Nagarle Basavaraju   commited 2024-02-07 16:07:39 +00:00
1fa6f09019
Support bringing up restricted wifi
This CL allows the Carrier Config app to request restricted WiFi nework
by setting the correspoding subscription ID in the network request.

Bug: 315835605
Test: atest android.net.cts.NetworkRequestTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.CarrierPrivilegeAuthenticatorTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest

Change-Id: I237e692d092ff5f969ce4b7962f6d58099a6f3a9

Ying Xu   commited 2024-02-07 04:24:38 -08:00
7cabd32bc5
Merge "Expose NET_CAPABILITY_LOCAL_NETWORK as public API" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-02-07 12:19:07 +00:00
54aaccc1c9
Expose NET_CAPABILITY_LOCAL_NETWORK as public API
Apps that target an SDK before {@link Build.VERSION_CODES.VANILLA_ICE_CREAM}
will not see networks with this capability unless they explicitly set the
NET_CAPABILITY_LOCAL_NETWORK in their NetworkRequests.

In this way, `NET_CAPABILITY_LOCAL_NETWORK` should be public.

Bug: 313000440
Test: None
Change-Id: I44d9cf3ecf5da471a627696f3d2680f35d4b122d

Handa Wang   authored and   Motomu Utsumi   commited 2024-02-07 17:23:42 +09:00
21005edfdf
Merge "Remove strict_updatability_linting: true" into main
Cole Faust   authored and   Gerrit Code Review   commited 2024-02-02 18:21:10 +00:00
1042c175a0
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
Merge changes from topic "mdns-subtype-discovery" into main
* changes:
  [mdns] add service-side impl for subtypes discovery
  [mdns] add API for discovery with subtype

Kangping Dong   authored and   Gerrit Code Review   commited 2024-01-26 04:48:24 +00:00
61fba508f8
Bpf: open code PRE_T - too complex for errorprone linter
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1ad2d0dd288882e84925f0b59961dcd33612f3f7

Maciej Żenczykowski   commited 2024-01-25 16:09:11 -08:00
0d450d3e4d
Remove strict_updatability_linting: true
strict_updatability_linting has been disabled for a while now, due to
an expansion in scope of the NewApi check. We're going to re-enable
it now, but doing so requires removing it from all modules that have
baselined NewApi issues.

Bug: 320698986
Test: Presubmits
Change-Id: Id6c9202c236f33ad89615e4d5fa5a6364147841a
Merged-In: Id6c9202c236f33ad89615e4d5fa5a6364147841a

Cole Faust   commited 2024-01-25 09:38:25 -08:00
ee56c432e0
[mdns] add API for discovery with subtype
This commit adds support of discovering services with explicit subtype.

With this change, a service can be discovered with subtype with:
```
nsdManager.discoverServices(
        new DiscoveryRequest.Builder("_http._tcp", PROTOCOL_DNS_SD)
	        .setSubtype("_printer").build(),
	executor, listener);
```

Bug: 265095929
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Iba76283a003cf2d52a8c26e1de872c3e8e433350

Kangping Dong   commited 2024-01-25 20:15:21 +08:00
97d6aeb3a2
Baseline NewApi issues
NewApi is a lint check that you don't call framework methods that were
introduced in versions later than your min_sdk_version. We want to
make this an error, so we're baselineing all existing issues.

This cl was generated automatically, by taking all the NewApi issues
from the reference baselines, and all the non-NewApi issues from the
existing checked in baselines.

Bug: 268261262
Test: Presubmits
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4ecdedda379e4e9040eb87b01dc3d8efb89be810)
Merged-In: I0393f24f101876abc458ca139eefdb279dcb2b03
Change-Id: I0393f24f101876abc458ca139eefdb279dcb2b03

Cole Faust   authored and   Android Build Cherrypicker Worker   commited 2024-01-25 02:41:58 +00:00
be30b3e96e
Merge "Support multicast routing" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-01-22 00:55:10 +00:00
bcc245d5bf
Support multicast routing
Added support to apply multicast routing config between network
interfaces in MulticastRoutingCoordinatorService.

Bug: 281217735

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.connectivity.MulticastRoutingCoordinatorServiceTest

Change-Id: If608b79d4e62a20d2e01755a83a901f6e274d9a2

Yang Sun   commited 2024-01-20 21:32:11 +08:00
baa50fa478
Support checking kernel bitness via JNI
Bug: 319532485
Test: Verified the return value on husky(64-bit kernel)
      and mokey_go32 (32-bit kernel)
Test: NetworkUtilsTest#testIsKernel64Bit
Change-Id: I929ce23932698b44a72ce4f35e2bd5a41ba472ee

Yan Yan   commited 2024-01-18 01:10:59 +00:00
287258dfb7
Merge "Add more context in javadoc of setDataSaverEnabled" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2024-01-15 06:43:48 +00:00
9c8111dd3a
Add more context in javadoc of setDataSaverEnabled
This addresses API council review feedback at b/307695368

Test: TH
Fix: 307695368
Change-Id: Ifc8cb890ff73be423d38e06a516853da4b9ee97f

Junyu Lai   commited 2024-01-15 11:40:59 +08:00
f304823023
Merge "Introduce NsdManager API for in-place service updates without re-announcement." into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-12-27 08:26:54 +00:00
8c22b9a37c
implement Thread Border Router e2e integration test
This implements a basic border routing test case (ping) and demonstrates a
valid test environment for Thread Border Router test cases.

Later we can add more packet verifications and more test cases.

Bug: 295843010
Test: atest android.net.ThreadBorderRouterTest

Change-Id: Ifb9b6d45539143a227c2bc0ed69b5c3167ef9acd

Handa Wang   commited 2023-12-26 15:24:54 +08:00
806f5a1bec