summaryrefslogtreecommitdiff
path: root/packages
AgeCommit message (Collapse)Author
2021-03-23Merge "Add NetworkRequest.Builder creating from an existing instance"Chiachang Wang
2021-03-23Add NetworkRequest.Builder creating from an existing instanceChiachang Wang
Provide a formal way to construct a new NetworkRequest from an existing instance. The network capabilities inside the NetworkRequest is hidden. There is no way to pass a NetworkRequest and update its capabilities. Add NetworkRequest.Builder creating from an existing instance to allow to clone the network capabilities. Bug: 172183305 Test: make update-api Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531 Merged-In: I068462b2a1410daf67b0c95f2b643d396f079531
2021-03-23Merge "[VCN15] expose addUnwantedCapability and related APIs"Junyu Lai
2021-03-23Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass"Lorenzo Colitti
2021-03-23Merge changes I638ed5cd,I29f15571,I21a22ed1Lorenzo Colitti
* changes: Expose registerDefaultNetworkCallbackAsUid. Support calling registerDefaultNetworkCallback for another UID. Store the effective UID in NetworkRequestInfo.
2021-03-23Have a new method in NetworkAgentConfig.Builder to set allowBypasslucaslin
Have a new method in NetworkAgentConfig.Builder for Vpn to set allowBypass. Bug: 182963397 Test: m Change-Id: I3f244464438325ee7f8a1b953d3fb28186293628
2021-03-22Expose registerDefaultNetworkCallbackAsUid.Lorenzo Colitti
Bug: 165835257 Test: atest FrameworksNetTests Change-Id: I638ed5cd5273d456919630aba1e22f099df1b36c
2021-03-22Support calling registerDefaultNetworkCallback for another UID.Lorenzo Colitti
This is to be used by privileged components (e.g., JobScheduler) to request callbacks about the state of other UIDs on the system. Bug: 165835257 Test: new unit test coverage Change-Id: I29f155710394e58c14fcef488db6271d8d83033a
2021-03-22[VCN15] expose addUnwantedCapability and related APIsjunyulai
Test: m -j doc-comment-check-docs Bug: 175662146 Merged-In: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7 Change-Id: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7 (cherry-picked from ag/13929102)
2021-03-22Merge "Remove Preconditions usage in TestNetworkSpecifier"Remi NGUYEN VAN
2021-03-22Merge "Revert "Revert "Remove connectivity dependency on Preconditions"""Remi NGUYEN VAN
2021-03-22Merge "Add TEST_MAPPING for Connectivity"Remi NGUYEN VAN
2021-03-22Merge "Move trimV4AddrZeros to libs/net"Treehugger Robot
2021-03-22Remove Preconditions usage in TestNetworkSpecifierRemi NGUYEN VAN
Preconditions is a hidden API utility. It can be easily replace by inline checks. Bug: 177046265 Test: m Change-Id: I3f722075fb9c74e12e40348ba4faad2f0fa67178 Merged-In: I3f722075fb9c74e12e40348ba4faad2f0fa67178
2021-03-22Revert "Revert "Remove connectivity dependency on Preconditions""Remi NGUYEN VAN
Preconditions.checkNotNull is deprecated to be replaced by Objects.requireNonNull, and other methods can easily be replaced by inline checks. Preconditions is an internal API class that should not be used by unbundled jars. Bug: 177046265 Change-Id: I3a67d266b32142c034520acbcdc30f7213db5e13 Merged-In: I3a67d266b32142c034520acbcdc30f7213db5e13 Test: m
2021-03-21Merge "Add SystemMessages protos to Connectivity"Remi NGUYEN VAN
2021-03-21Merge "Swap parameters in QosCallback#registerQosCallback"Jayachandran Chinnakkannu
2021-03-21Merge changes from topics ↵Treehugger Robot
"revert-1645768-revert-1626206-replaceUidRange-MSYTKFNGUE-HIUTVTIGIR", "ti_redaction" * changes: TransportInfo: Add a generic redaction mechanism Revert "Revert "Expose uids related APIs in NetworkRequest and N..." Revert^2 "Replace the usage of UidRange"
2021-03-21Use module resources in NetworkNotificationManager.Lorenzo Colitti
Also make getTransportName non-static so it can access the module resources. Also fix a duplicate comment in a resource file. Bug: 183097033 Test: atest FrameworksNetTests Test: connected to Wi-Fi with no Internet, observed notification Change-Id: Ic0d24d36af0b87153d527083f8964ddc6cd78482 Merged-In: Ic0d24d36af0b87153d527083f8964ddc6cd78482
2021-03-20Add connectivity protos to framework-connectivityRemi NGUYEN VAN
The protos are built separately by framework-connectivity from framework protos, keeping only android.net protos for the connectivity jar. Bug: 171860710 Test: m framework-connectivity.impl Change-Id: I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c Merged-In: I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c
2021-03-20Move connectivity AIDLs to android.netRemi NGUYEN VAN
java_sdk_libraries and apexes need to contain bootclasspath classes under predefined packages. Tethering currently uses android.net, so make sure all the connectivity bootclasspath classes are under android.net. This avoids maintaining two packages for the tethering APEX, where com.android.connectivity.aidl is only used by internal AIDL files. Bug: 182984842 Test: m Change-Id: I611f1941698c574e37aea912ee76dadc8b32e41a Merged-In: I611f1941698c574e37aea912ee76dadc8b32e41a
2021-03-20Migrate framework-connectivity internal resourcesRemi NGUYEN VAN
Use ServiceConnectivityResources instead. Start by creating resources in the ServiceConnectivityResources package to match the internal configuration, and common overlays. Bug: 182125649 Test: device boots, has connectivity Change-Id: I77a3efca2cd644f9828db1ed5d3cae8070fb8363 Merged-In: I77a3efca2cd644f9828db1ed5d3cae8070fb8363
2021-03-20Add multipath preference, background status APIRemi NGUYEN VAN
Add APIs for getMultipathPreference and getRestrictBackgroundStatus. Both are used by Connectivity to back the external ConnectivityManager.getRestrictBackgroundStatus, and ConnectivityManager.getMultipathPreference APIs. Test: atest CtsNetTestCases atest ConnectivityServiceTests atest NetworkPolicyManagerServiceTest Bug: 176289731 Change-Id: I8a03162b2f6691086bb64e75ffd354cdfca7f86a Merged-In: I8a03162b2f6691086bb64e75ffd354cdfca7f86a
2021-03-20Copy NetworkNotificationManager resources to conectivity module.Lorenzo Colitti
The localized resources were automatically generated with: =========== export OLDRES=core/res/res export NEWRES=packages/Connectivity/service/ServiceConnectivityResources/res export FILE=services/core/java/com/android/server/connectivity/NetworkNotificationManager.java for i in $OLDRES/values-*/strings.xml; do outfile=$NEWRES/${i#core/res/res/} outdir=$(dirname $outfile) if egrep -q "$regex" $i || egrep -q "$strarrayregex" $i; then mkdir -p $outdir cat << EOF > $outfile <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> EOF egrep $regex $i >> $outfile egrep -A $strarraylines "$strarrayregex" $i >> $outfile echo "</resources>" >> $outfile fi done =========== The text to the the base resources file was added manually from the output of: =========== egrep -B 2 $regex core/res/res/values/strings.xml | grep -v -- ^-- egrep -B 2 -A 6 $strarrayregex core/res/res/values/strings.xml | grep -v -- ^-- =========== The drawables were copied from the Wifi resources and from the framework resources. Test: m Bug: 183097033 Change-Id: I99c0d28069dd1a13d452105b0a83a03a833232a2 Merged-In: I99c0d28069dd1a13d452105b0a83a03a833232a2
2021-03-20Merge changes from topic "app_hibernation_permission"Kevin Han
* changes: Add API to get hibernating packages Add MANAGE_APP_HIBERNATION permission
2021-03-19TransportInfo: Add a generic redaction mechanismRoshan Pius
This replaces the existing mechanism for redacting location sensitive fields with a more extensible mechanism. Currently supported redactions are for the following permissions: i. ACCESS_FINE_LOCATION ii. LOCAL_MAC_ADDRESS iii. NETWORK_SETTINGS Also, removed WifiInfo from ConnectivityServiceTest to reduce cross dependencies on wifi code. Bug: 156867433 Bug: 162602799 Test: atest android.net Test: atest com.android.server Change-Id: I2bb980c624667a55c1383f13ab71b9b97ed6eeab
2021-03-19Add MANAGE_APP_HIBERNATION permissionKevin Han
Add permission for app hibernation state manipulation. Bug: 183058954 Test: run hibernation job and confirm the API works for PermissionController (cherrypick of ag/13909632) Merged-In: Id57ee57f49710d0b8a49a4ec561800db43089f87 Change-Id: Id57ee57f49710d0b8a49a4ec561800db43089f87
2021-03-19Add TEST_MAPPING for ConnectivityRemi NGUYEN VAN
The TEST_MAPPING triggers connectivity tests in other paths. Bug: 183198868 Change-Id: I8d9b0450ea4b3ef3e5115d1f858b1aa7badef742 Test: Needs treehugger for testing
2021-03-19Fix InetAddressCompat exception handlingRemi NGUYEN VAN
Fix InetAddressCompat exception handling to throw the original exception in case of InvocationTargetException, rather than wrapping in a generic IllegalStateException. Bug: 183198868 Test: Test device with and without connectivity Change-Id: Idc4d678afe9f20f920d7061790af4203ab75be26
2021-03-19Merge "Add startCaptivePortalApp to system API"Chiachang Wang
2021-03-19Merge "[NS03] Mix in other CS-managed properties"Chalard Jean
2021-03-19Merge "Expose getCapabilities"Lucas Lin
2021-03-19Merge "Remove hidden LinkProperties methods accesses"Paul Hu
2021-03-19[NS03] Mix in other CS-managed propertiesChalard Jean
These properties are necessary to figure out the maximum score of a network. Test: FrameworksNetTests Change-Id: I48dce20ad4a80597039393dca607e8da829b2a61
2021-03-19[NS02] Mix in validation of the scoreChalard Jean
Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests Change-Id: I9cac3a05ad0c4008599973b12d2c5e4c02233a5c
2021-03-19Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API"Treehugger Robot
2021-03-19Revert "Revert "Expose uids related APIs in NetworkRequest and N..."Chiachang Wang
Revert^2 "Add shims for NetworkRequest" b72b3ca768fc25ef72dc78f1396b08447b8ef5c6 NetworkRequest is moving into the incoming connectivity mainline module. The hidden setUids becomes inaccessible outside the module. Shims for support cts in different API levels will need to use it to verify the behavior of NetworkRequest. Thus, expose it to the API surface. Also, VPN uses getUids and setUids to control network capabilities. Networkcapabilities is a part of incoming connectivity mainline module but VPN is not. Thus, exposing these two methods are needed to allow VPN to continue using it. Test: make update-api Bug: 172183305 Change-Id: I4b8e1aa558e3459a932535f9901f4ae86b0ecb67 Merged-In: I107c329d4d7130d488772166eae8b5e7aaa2ff04
2021-03-19Revert^2 "Replace the usage of UidRange"Chiachang Wang
5b7aad6995711879823b6a035792b13c5cc06f59 UidRange is used in a shared way between ConnectivityService and VPN through the use of NetworkCapabilities. UidRange will be part of the ConnectivityService mainline but Vpn.java will stay in the framework. We need a way to replace the APIs using UidRange, or to make UidRange system API. The only really relevant surface here is NetworkCapabilities#{setUids, getUids}. The need for UidRange could be replaced by an integer Range, so replace the usage of UidRange by a integer Range in NetworkCapabilities#{setUids, getUids} and update the relevant callers. Bug: 172183305 Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk Change-Id: I0f679fb5fb8f4fe26461ca4912ca1fdfe7f43c9e Merged-In: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
2021-03-19Merge "Fix CS external dependencies on CarrierDefaultApp"Paul Hu
2021-03-18Merge "Add InetAddressCompat"Remi NGUYEN VAN
2021-03-18Merge "Move network selection utils to Connectivity"Remi NGUYEN VAN
2021-03-18Merge changes from topic "revert-1626206-replaceUidRange-MSYTKFNGUE"Anthony Stange
* changes: Revert "Replace the usage of UidRange" Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."
2021-03-18Revert "Replace the usage of UidRange"Anthony Stange
Revert "Add shims for NetworkRequest" Revert submission 1626206-replaceUidRange Reason for revert: Breaking build - b/183106405 Reverted Changes: I0b79c73e8:Add shims for NetworkRequest I4bc0daf5a:Replace the usage of UidRange I4e5aec6ef:Replace the usage of UidRange I107c329d4:Expose uids related APIs in NetworkRequest and Net... Change-Id: I6290429db1c8e787f8138b55b98fd92a74ac6402
2021-03-18Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."Anthony Stange
Revert "Add shims for NetworkRequest" Revert submission 1626206-replaceUidRange Reason for revert: Breaking build - b/183106405 Reverted Changes: I0b79c73e8:Add shims for NetworkRequest I4bc0daf5a:Replace the usage of UidRange I4e5aec6ef:Replace the usage of UidRange I107c329d4:Expose uids related APIs in NetworkRequest and Net... Change-Id: I45e08f89533af0d6851add38fecb5c6c114615ae
2021-03-18Move network selection utils to ConnectivityRemi NGUYEN VAN
NetworkScore, IOnCompleteListener should be in the Connectivity scope, as they are supporting classes for the ConnectivityManager APIs. Bug: 181512874 Test: m Change-Id: I6dc40a80e0bf5f86f5625b657b01eba969d41fcf
2021-03-18Add InetAddressCompatRemi NGUYEN VAN
Although the InetAddress symbols used by Connectivity are stable core platform API, and should be usable, the core_current stubs are not yet part of the module_current API. Until that is fixed, add an InetAddressCompat utility that calls the three static methods by reflection. Test: atest FrameworksNetTests CtsNetTestCases Bug: 183097033 Change-Id: I797009aeff1d39ae2dc06ef69d2e235689b43c89
2021-03-18Add startCaptivePortalApp to system APIRemi NGUYEN VAN
The API is already used by settings and should be usable by setup wizards. It is the only way for a caller outside of the system_server to trigger the captive portal application. The API is already CTS tested in android.net.cts.CaptivePortalTest. Fixes: 182871577 Test: atest CtsNetTestCases:android.net.cts.CaptivePortalTest Change-Id: Ie8d9a546b54524ba837715baa94a07d1f993d8d3
2021-03-18Remove hidden LinkProperties methods accessesChiachang Wang
This commit resolves the hidden methods accesses for LinkProperties in Setting libs. Replace them with equivalent methods. Bug: 172183305 Test: m Change-Id: I66592aa9e0e5982c9fae51de3587c1e759f545ef
2021-03-18Merge "Expose systemReady for SystemServer"Lucas Lin
2021-03-18Merge changes from topic "replaceUidRange"Chiachang Wang
* changes: Expose uids related APIs in NetworkRequest and NetworkCapabilities Replace the usage of UidRange