- Mar 16, 2021
-
-
Lucas Lin authored
-
lucaslin authored
NETWORK_STACK_UID check was introduced by aosp/1134635, and it assumed that wifi factories/agents will be running on the network stack process, but it didn't eventually. It runs in the system server instead. So remove this check. Bug: 170598012 Test: atest FrameworksNetTests Change-Id: Ie11268738e364e252f18876f7a4a0dc064ca8b9c
-
Lucas Lin authored
-
Lucas Lin authored
-
Chalard Jean authored
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
-
- Mar 15, 2021
-
-
Lorenzo Colitti authored
-
Aaron Huang authored
* changes: Make PacProxyService be a system service Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
-
Sorin Basca authored
* changes: Using jniThrowErrnoException in android_util_Process Using jniThrowErrnoException in android_os_SharedMemory Using jniThrowErrnoException in android_net_NetworkUtils
-
lucaslin authored
Bug: 172183305 Test: N/A Change-Id: Id274295d6c8c97d3014214f875168ff968f79bb6
-
Chalard Jean authored
As attested by numerous TODOs in the code, a new way of representing network quality and policy is needed instead of an int. An int representing the quality of the network requires all parties using it to know how all other parties are using it, and implementation details about the decision algorithm. For all intents and purposes, the selection is left to individual network factories who try to achieve a desired result while piecing together all possible states of the system. As the number of such cases and desires increases, this becomes both intractable and unmaintainable. Indeed, at this time in the codebase nobody can really predict exactly how a given change in score will affect selection across the board, and it is essentially impossible to figure out the behavior of network selection by inspecting the code because the moving parts are scattered throughout the entire codebase. Having an object encapsulating policy and quality values will let us centralize the selection and make it again possible to maintain without knowledge of all behaviors of all network factories. It will also provide better guarantees of respecting policy, and allow bugfixes that were not possible before because they'd touch too many parts of the code. Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests Change-Id: I3185a6412b9b659798faf0c6882699e9c63cc115
-
Frank Li authored
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
This reverts commit 62b1df44. Reason for revert: Build broken: b/182721112 Change-Id: Ibc84ec6d7900fdcf0bc14cd7036f9c08287711db
-
Paul Hu authored
-
Aaron Huang authored
PacProxyInstaller class is running a thread all the time and is listening to intent ACTION_PAC_REFRESH so it would be better to make it be a system service with a manager class PacProxyManager which is obtained with getSystemService(PacProxyManager.class). Besides, rename PacProxyInstaller to PacProxyService will be easier to know it's the service for PacProxyManager. ConnectivityService is going to be a mainline module and it needs constructor of PacProxyService to be SystemApi. However, in current design, it needs to pass a handler and an int arguments to the constructor which would be difficult to maintain if just expose the constructor directly. So, define a listener for the event that the current PAC proxy has been installed so that the handler and the int arguments can be removed from the constructor. Bug: 177035719 Test: FrameworksNetTests Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
-
Remi NGUYEN VAN authored
-
lifr authored
ConnectivityService is going to become a mainline module, and it will not able to use hidden method anymore. Using PlatformProperties as a static library instead of hidden API. Bug: 170917042 Test: atest FrameworksNetTests Merged-In: I3a3deca5d2e0f690db8c0061de2db2217376d268 Change-Id: I3a3deca5d2e0f690db8c0061de2db2217376d268
-
lucaslin authored
The caller to create a TestNetworkService via ConnectivityManager#startOrGetTestNetworkManager should have passed the MANAGE_TEST_NETWORKS permission check and the caller doesn't need to declare the permission to pass the permission check of registerNetworkProvider. So call clearCallingIdentity when calling registerNetworkProvider in TestNetworkService. Bug: 181573283 Test: atest CtsNetTestCases:ConnectivityManagerTest#testRequestBackgroundNetwork Change-Id: Ia28627dacf933d1937978ed9709b975c9a4660ce
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
ParseException constructors are used by both platform and mainline module code, so they can't be package-private. Removing dependencies on either side is not possible as the class itself is part of the public API, and supports APIs on both sides. Having the constructors part of the API makes the class usable by both sides. Fixes: 182705505 Test: CtsNetTestCases for APIs using the exception Change-Id: Ia396ab2fa3afaed3cf474c8e60f72fc7f3f4fded
-
- Mar 12, 2021
-
-
paulhu authored
-Connectivity is becoming a mainline module in S but mainline modules are not allowed to use non-formal APIs. Thus, replace non-formal API InetAddress#parseNumericAddress to InetAddresses#parseNumericAddress. - Add deprecated method legacyParseIpAndMask() for IpPrefix and LinkAddress. Because InetAddresses#parseNumericAddress has a little different behavior in some case, but these two classes should keep working as before. So these two classes will use the new deprecated method. Bug: 181756157 Test: FrameworksNetTests Change-Id: I1c96b75f0b8d5e93304a39b4a8c8849964e5e810
-
lucaslin authored
- Expose PRIVATE_DNS_MODE_OFF, PRIVATE_DNS_MODE_OPPORTUNISTIC and PRIVATE_DNS_MODE_PROVIDER_HOSTNAME for external users. - Since PRIVATE_DNS_DEFAULT_MODE_FALLBACK might be changed from release to release, so it cannot be exposed as a system API. Remove PRIVATE_DNS_DEFAULT_MODE_FALLBACK and have a new API - getPrivateDnsMode() for users to get the private DNS mode instead. Bug: 172183305 Test: atest FrameworksNetTests CtsNetTestCases Change-Id: I02a1e91b4eafb5f5df3eada1c07b99849a050c3c Merged-In: I02a1e91b4eafb5f5df3eada1c07b99849a050c3c
-
Remi NGUYEN VAN authored
The VpnType annotation is a hidden symbol, and should be kept hidden as annotations are disallowed by API guidelines. Remove its usage in VpnTransportInfo as users of annotated constants that build against API stubs are expected not to use the annotation. Bug: 173331190 Test: m Change-Id: I171fa57f6279defad081c3cd16265d58ec55e57d
-
Remi NGUYEN VAN authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Junyu Lai authored
* changes: [VCN12] Expose setSubIds/getSubIds APIs [VCN04] Add Subscription Id set into NetworkCapabilities
-
Roshan Pius authored
-
Paul Hu authored
-
Treehugger Robot authored
-
Remi NGUYEN VAN authored
-
Lucas Lin authored
* changes: Use new API - getIpSecNetIdRange() in IpSecService Add a new API to get the network ID range of IPSec tunnel interface
-
Remi NGUYEN VAN authored
Create the ServiceConnectivityResources package, which contains resources Connectivity unbundled from platform resources. Migrate the first few resources from ConnectivityService that have no RRO in AOSP. To avoid boot time impact, avoid loading the resources in the ConnectivityService constructor. Bug: 182125649 Test: atest FrameworksNetTests Merged-In: I77ac6f4303c54acc96f16e18ef02add30298ff3d Change-Id: I77ac6f4303c54acc96f16e18ef02add30298ff3d
-
Frank Li authored
-
Roshan Pius authored
Existing NetworkCallback users will get NetworkCapabilities with location sensitive data removed (except for ownerUid which will be added for existing apps for backwards compatibility). Apps have to opt-in to receive location sensitive data. Note: This was chosen because WifiInfo is the only TransportInfo tha has location sensitive info & that was added only in Android 12. If we choose to default to true, all existings apps retrieving NetworkCapabilities for wifi networks will be blamed for location access unnecessarily. Changes: i) Add a flag in NetworkCallback creation to retrieve NetworkCapabilities with location sensitive info in their callback. (More flags are being planned for NetworkCallback for throttling callback frequency, etc) ii) For NetworkCapabilities.getOwnerUid(), we will continue to send the data for apps targeting older SDK (since this is an existing field and the new flag defaults location sensitive data to off). Bug: 156867433 Test: atest android.net Test: atest com.android.server Change-Id: If70b5ea6f5c8885f0c353c8df08a826d55fe7f7a
-
- Mar 11, 2021
-
-
Remi NGUYEN VAN authored
* changes: Fix common tests on Q and R Add Ethernet, TestNetworkSpecifier API
-