summaryrefslogtreecommitdiff
path: root/packages/Connectivity
AgeCommit message (Collapse)Author
2021-05-24Remove packages/Connectivity.Baligh Uddin
It has moved to packages/modules/Connectivity. Also adjust include_dir paths in frameworks/base/Android.bp BUG: 186628461 TEST: TH Merged-In: I2727e13dbe051162f23ef279ca11cd5cca1fc761 Change-Id: I2a7a181e65be8952f8044df845efa80b6134d416
2021-05-22Merge changes I1de322c9,Id0983d4b into sc-devTreeHugger Robot
* changes: Improve IKEv2/IPsec VPN by proposing more IPsec algorithms Improve IKEv2/IPsec VPN by proposing more IKE algorithms
2021-05-22Merge "Check location permission for ConnDiags last." into sc-devTreeHugger Robot
2021-05-22Merge "Use CS identity to update setting while performing factory reset" ↵TreeHugger Robot
into sc-dev
2021-05-21Improve IKEv2/IPsec VPN by proposing more IPsec algorithmsYan Yan
This commit allows IKEv2/IPsec VPN to propose more algorithms that newly added in IpSecAlgorithm. Those new algorithms have stronger security guarantees and better performances. This commit also removes algorithm name validation because all algorithms are URL encoded to ensure no special characters create problems due to their use by VpnProfile for list or field delimiting (e.g. rfc7539esp(chacha20,poly1305)) Bug: 185265778 Test: atest FrameworksNetTests, CtsNetTestCases Test: All new algorithms are manually verified Change-Id: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c Merged-In: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
2021-05-21Check location permission for ConnDiags last.Cody Kesting
This CL updates ConnectivityService to check location permissions for ConnectivityDiagnostics callbacks last in the permission check process. This minimizes misattribution of location access for networks that an app is not administering. This CL also updates ConnectivityDiagnosticsManager documentation to clearly state that location permissions are required in order to receive callbacks. Bug: 187310575 Test: atest ConnectivityDiagnosticsManagerTest Test: atest ConnectivityServiceTest Change-Id: I2dbeddac6273e2392ccaeae51a1c7776d6d3da75 Merged-In: I2dbeddac6273e2392ccaeae51a1c7776d6d3da75 (cherry picked from commit 09f0f7dff0ac65cfe8277c2f6377ee7bab1a9a13)
2021-05-21Use CS identity to update setting while performing factory resetTreehugger Robot
When apps try to call factoryReset to do networking reset, it will result in updating the setting in SettingsProvider. ContentProvider will verify if the package name of the caller that initiated the request being processed on the current thread. The package should belong to the calling UID. The setting update started from the ConnectivityService context, so the package will be android but the calling UID will be the calling app. It will cause a SecurityException. The behavior is fine previously as its known caller(Settings) shares system UID. But it will be a problem for other callers, such as CTS. Thus, clear the identity since the necessary permission check should be examined at the top of the method. The following actions should be fine to be proceed from the system itself. Also replace the user restriction check via hasUserRestrictionForUser with the UserHandle created from the calling uid to ensure it's verified with correct user. Bug: 186061922 Test: Factory reset from Settings Merged-In: If2dd69f702a1eafff331f9e71f6b92aeadfb715d Change-Id: If2dd69f702a1eafff331f9e71f6b92aeadfb715d (cherry picked from commit 0b1b84179f10804a55561c0d6e0751efecf2c77a)
2021-05-21Add test for NetworkCapabilities.Builder.withoutDefaultCapabilitiesChiachang Wang
Bug: 186061922 Test: atest CtsNetTestCases:android.net.NetworkCapabilitiesTest Merged-In: I369e71dd6ae85da78e114ea8377967ab0bde787b Change-Id: I369e71dd6ae85da78e114ea8377967ab0bde787b (cherry picked from commit d39dae375e96e79630bf8d69944e415e3251c143)
2021-05-20Merge "Add more unit tests for ConnectivityManager S APIs" into sc-devTreeHugger Robot
2021-05-20Merge "Support to query TYPE_WIFI usage with subscriberId" into sc-devLes Lee
2021-05-20Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" into ↵Paul Hu
sc-dev
2021-05-20Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from ↵Paul Hu
PermissionMonitor" into sc-dev
2021-05-20Merge "Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshots" ↵TreeHugger Robot
into sc-dev
2021-05-20Merge "Remove legacy resources fallback from Connectivity" into sc-devRemi NGUYEN VAN
2021-05-19Add more unit tests for ConnectivityManager S APIsJunyu Lai
Ignore-AOSP-First: Avoid merge conflict Test: atest android.net.ConnectivityManagerTest Bug: 188657173 Change-Id: I33612650eb89486a14fcfc440ba0c357f4bb513c
2021-05-19Merge "Add metered filter for API: buildTemplateCarrier" into sc-devLes Lee
2021-05-19Merge changes I3ba50cbd,I970ee365 into sc-devJunyu Lai
* changes: [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots [FUI27] Fix internal naming of notifyNetworkStatus
2021-05-19Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is ↵Junyu Lai
present" into sc-dev
2021-05-19[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is presentjunyulai
Test: atest NetworkRequestTest#testBypassingVcn Fix: 176939355 Fix: 188597540 Merged-In: I98dd3f4652dc067eb5c4666e952db6c854bcbb10 Change-Id: I98dd3f4652dc067eb5c4666e952db6c854bcbb10 (cherry-picked from aosp/1705390)
2021-05-19Merge "Move config_apf* resources to NetworkStack" into sc-devRemi NGUYEN VAN
2021-05-19Remove legacy resources fallback from ConnectivityRemi NGUYEN VAN
Stop reading legacy resources as fallback, and only use resources in ServiceConnectivityResources. Bug: 185850634 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: I224f1ef9a1a8d6e636c7e9550845ab3e1394d7f3
2021-05-19Add metered filter for API: buildTemplateCarrierlesl
This CL modifies NetworkTemplate#buildTemplateCarrier to force on metered carrier network and rename to buildTemplateCarrierMetered. This method was introduced recently and has no callers. This method will be used in Settings and NetworkPolicyManagerService to display and manage data usage on carrier metered networks. Settings/NetworkPolicyManagerService will use it instead of the existing method buildTemplateMobileAll method, which only matches metered networks. That code will change from matching metered mobile networks to matching metered carrier networks. Note: The carrier metered network includes metered mobile network and metered "merged carrier wifi network" that is a specific cerrier wifi network which provides the same user experience as mobile. Bug: 176396812 Test: atest -c NetworkTemplateTest Change-Id: I7196d62bb60844458a6c4b1d94e2baccb71e15cd Merged-In: I7196d62bb60844458a6c4b1d94e2baccb71e15cd
2021-05-19Support to query TYPE_WIFI usage with subscriberIdlesl
Previous the API ignores subscriberId when network type is WIFI. Allow caller to call querySummaryXXXX with TYPE: WIFI + subscriberId: IMSI to get carrier merged wifi usage which matches the wifi network with the given IMSI. Bug: 176396812 Test: atest -c NetworkStatsServiceTest Change-Id: Ia033521a24e2bb56182d74a41bb2b39710571782 Merged-In: Ia033521a24e2bb56182d74a41bb2b39710571782
2021-05-19Move config_apf* resources to NetworkStackRemi NGUYEN VAN
The resources are only read by NetworkStack through their respective ApfCapabilities SystemApi methods. As the resources are being migrated out of frameworks/base resources anyway, move them directly to NetworkStack instead of moving them to ServiceConnectivityResources. Also test that the framework resources are not overlaid or modified. This should avoid OEM integration errors where the overlays are kept as in R, without overlaying the resource in the NetworkStack package. Bug: 185850634 Test: atest CtsNetTestCases BYPASS_INCLUSIVE_LANGUAGE_REASON=Need to mention legacy APIs Merged-In: I7a15ddcad5af11fa307d9dbe3a77b31a1179e5b3 (clean cherry-pick) Change-Id: I7a15ddcad5af11fa307d9dbe3a77b31a1179e5b3
2021-05-18Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observerPaul Hu
PermissionMonitor register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer to listen setting changed callback. Then update or revoke permission for those apps. Bug: 185149952 Test: atest FrameworksNetTests Merged-In: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520 (clean cherry-pick) Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
2021-05-18Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitorPaul Hu
Let PermissionMonitor read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting and grant netd system permission to uids whose package name is listed in setting. Bug: 185149952 Test: atest FrameworksNetTests Merged-In: I856b545c0339a262abbe9d432cfda125bc82dc12 (clean cherry-pick) Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
2021-05-18Merge "Dump only NORMAL priority information if no priority assigned" into ↵Chiachang Wang
sc-dev
2021-05-18Allow unprivileged NetworkCallbacks to see other UIDs' networks.Lorenzo Colitti
Currently, unprivileged apps can call getAllNetworks() to see all networks on the system, even networks that do not apply to them. Allow them to do this via NetworkCallbacks as well. This is the last piece of information that was only available through getAllNetworks, so this CL deprecates that API. Bug: 187921303 Test: new unit tests Test: CTS test in other CL in topic Change-Id: I30f1021927d3c8eae6525116c61ff4a4acecff6d
2021-05-18Dump only NORMAL priority information if no priority assignedChiachang Wang
The legacy design of "dumpsys connectivity" will only dump information with NORMAL priority. It was updated to provide both NORMAL and HIGH priority information in order to support dump in bugreport. However, it will also affect the result using dumpsys connectivity. Update design to dump NORMAL priority only to align with legacy design. Bug: 188387185 Test: adb shell dumpsys connectivity Test: adb bugreport and check the result in bugreport Change-Id: I6825c5038e48e3060c0c3ad1512bd584ef6d10a7 Merged-In: I6825c5038e48e3060c0c3ad1512bd584ef6d10a7
2021-05-17Merge "Add ConnectivityAnnotations class" into sc-devAaron Huang
2021-05-17Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshotsjunyulai
This is declared in the API surface, but the implementation does not match. Ignore-AOSP-First: Needs cherry-picks Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testGetAllNetworkStateSnapshots Bug: 188140631 Change-Id: I97aa69651461ebe5c323ec669372f9a61b84e6a6
2021-05-17[FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshotsjunyulai
Test: atest FrameworksNetTests Bug: 174123988 Merged-In: I3ba50cbd8a7f60779c69ba85e10dc3cc8a52f8b1 Change-Id: I3ba50cbd8a7f60779c69ba85e10dc3cc8a52f8b1 (cherry-picked from aosp/1620859)
2021-05-17[FUI27] Fix internal naming of notifyNetworkStatusjunyulai
Test: TH Bug: 174123988 Merged-In: I970ee365ca221956ee85788005d331374b5fa71a Change-Id: I970ee365ca221956ee85788005d331374b5fa71a (cherry-picked from aosp/1620539)
2021-05-14Merge "QOS filter matching support based on remote address and port number ↵Jayachandran Chinnakkannu
for connected sockets" am: 853bb0df91 am: 5abb533da2 am: faf4ba40ba Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687813 Change-Id: I04ada71bdea2c3851fd6925126f6ff2bfdecad2c
2021-05-14Merge "QOS filter matching support based on remote address and port number ↵Jayachandran Chinnakkannu
for connected sockets"
2021-05-14Merge "[FUI26] Address comments on aosp/1560408" am: c1e493f98d am: ↵Junyu Lai
1befdd5001 am: c25bc707bc Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1618845 Change-Id: I8c62d218953027ee2fb5426ddacae5a6f8bb6c73
2021-05-14Merge "[FUI26] Address comments on aosp/1560408"Junyu Lai
2021-05-14Merge "Address [set|get]RestrictedAllowedApps API review feedback" am: ↵Paul Hu
f9dc4b0f52 am: bdf47a1733 am: cba89e7880 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708327 Change-Id: Ia8e395132226d23fdfb8cd4c93c004c459386104
2021-05-14Merge "Move connectivity test defaults to tests/common" into sc-devTreeHugger Robot
2021-05-14Merge "Reference unreachable netId from INetd" am: da4644daf7 am: 99f78a5484 ↵Treehugger Robot
am: 8d8a727cf7 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326 Change-Id: Ia8db25ba86450341d4b9278eba350014fa3b880c
2021-05-14Merge "Address [set|get]RestrictedAllowedApps API review feedback"Paul Hu
2021-05-14Merge "Address comments on ag/14486203" into sc-devTreeHugger Robot
2021-05-14Merge "Replace clearAll with withoutDefaultCapabilities" into sc-devChiachang Wang
2021-05-14Merge "Rename *Iface* APIs to *Interface*"Aaron Huang
2021-05-14Address comments on ag/14486203Chalard Jean
Bug: 186458024 Test: comment-only change Change-Id: I7b086abbb57354086e8fb1a41c63140f2227173f
2021-05-14[FUI26] Address comments on aosp/1560408junyulai
Test: TH Bug: 174123988 Change-Id: I949eeb8903e903d8ede90521442b1f917d5cdfeb
2021-05-14Address [set|get]RestrictedAllowedApps API review feedbackpaulhu
- Rename [set|get]RestrictedAllowedApps to [set|get]AppsAllowedOnRestrictedNetworks - Remove the regex of validate package name check Bug: 188085693 Test: m update-api && m Change-Id: I07966fb66093523a67e1e6a1ecfa05cc399e22f2
2021-05-14Move connectivity test defaults to tests/commonRemi NGUYEN VAN
The build file currently holds a single build rule in test/. Move it to the existing build file in tests/common/Android.bp. Test: m Bug: 186628461 Change-Id: I3948c9b46e2647f945a22f16aad493e94fe50b4d
2021-05-14Replace clearAll with withoutDefaultCapabilitiesChiachang Wang
As the feedback from API review, the clearAll method in Builder does not match the actual usage. Thus, remove it and replace with withoutDefaultCapabilities to provide clearer usage. Bug: 184735772 Test: make update-api ; m Change-Id: Ida8d25d57504864f046e3403f593cc606fbfe982 CTS-Coverage-Bug: 186061922
2021-05-14Reference unreachable netId from INetdKen Chen
Bug: 181579204 Test: m; atest FrameworksNetTests Change-Id: Id0d30363abe583459a8022e7400aab1dd4f72939