summaryrefslogtreecommitdiff
path: root/framework/src/android/net/ConnectivitySettingsManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Private DNS: Switch "Cloudflare DNS" to DNS-over-HTTPS"Chirayu Desai2022-12-031-1/+1
| | | | | | | | This reverts commit 73da8d618e556b067a4a387b214c6bfac9d82391. Reason for revert: Not working with global cleartext. Change-Id: I2b1cd401a82a3f7eb6ed4d6206b412905876d11c
* Add more DNS providers [2/3]minaripenguin372022-11-031-0/+39
| | | | | | Signed-off-by: minaripenguin37 <alexfinhart@gmail.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com> Change-Id: Id216ea3f806d2847059f6b8037865af254fd2676
* Add AdGuard DNS as a private DNS providerAdam Lawson2022-11-031-0/+12
| | | | | Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Change-Id: I55a74f9b6e1a37798ee899623e3ded536e11172c
* Private DNS: Switch "Cloudflare DNS" to DNS-over-HTTPSChirayu Desai2022-10-161-1/+1
| | | | | | | * Pros: Standard port (443) instead of 853 used by DNS-over-TLS Test: Visit https://1.1.1.1/help Change-Id: Ia2fb193d7c95e333be131770ff452ef568200bcb
* Add Cloudflare DNS as a private DNS providerChirayu Desai2022-10-161-0/+15
| | | | | | | | | | | | | | | | | TODO: Add tests Also includes: commit d82a7a0585671903ba18cd1d8fab25d9275c2a25 Author: Oliver Scott <olivercscott@gmail.com> Date: Fri Jan 29 10:57:26 2021 -0500 Fix Cloudflare private DNS provider Change-Id: I5932d8d7e82621220eb119a212ccecf15e284421 (cherry picked from commit 24abf646a0df5e00285d1b698adec03eb897388f) Change-Id: I7e8a320d47e7c5ddbcb9acfaf23032ae92d5d70d (cherry picked from commit 96ce93f7bf7233008591d22a0d24a6d7cd0a94ff)
* setUidsAllowedOnRestrictedNetworks: Modify UID enforcement to check app idOliver Scott2022-08-211-1/+1
| | | | | | | Binder's calling UID seems to return the full UID on occasion which fails when commpared to Process.SYSTEM_UID. Return the app id instead. Issue: calyxos#823 Change-Id: Ieb84d389b4f160370be2c890db4705d920aba4ee
* Fix rate limit API review commentsPatrick Rohr2022-02-181-6/+8
| | | | | | | | Follow up to aosp/1955583 to fix some review comments. Test: builds Bug: 219739904 Change-Id: Ie85dc72eb3bb6eda26b655a64eae0d7c0d8bf143
* Add setting that controls network rate limitPatrick Rohr2022-02-091-0/+41
| | | | | | | | | | | The INGRESS_RATE_LIMIT_BYTES_PER_SECOND setting controls the rate limit for internet networks. If set to -1, no rate limit applies. There is one global rate limit that will be applied to all networks with NET_CAPABILITY_INTERNET. Test: atest ConnectivitySettingsManagerTest Bug: 157552970 Change-Id: Ia82aa867686d484ce46734f76d4a48bf864eff84
* Force only system uid can set uids allowed on restricted networkspaulhu2021-07-021-0/+20
| | | | | | | | | | | | | - Check whether calling UID/PID is system_server. - For CTS test, enforce NETWORK_SETTINGS permission otherwise if it's a debug build. Bug: 175199465 Test: atest FrameworksNetTests Test: atest ConnectivityManagerTest#testUidsAllowedOnRestrictedNetworks Merged-In: I175a831671d3e52460d28203b09f6c0dda56b61c Change-Id: I175a831671d3e52460d28203b09f6c0dda56b61c
* Add ConnectivitySettingsManagerTestpaulhu2021-06-221-5/+8
| | | | | | | | | | - Add tests for ConnectivitySettingsManager. - Also address leftover javadoc comments. Bug: 182538166 Test: atest FrameworksNetTests Test: atest CtsNetTestCases Change-Id: I8161c1bca84b41964578d59ee5d6ab07b2380707
* Call ConnectivitySettingsUtils to set/get private DNS related settingslucaslin2021-06-211-52/+13
| | | | | | | | | | | ConnectivitySettingsManager and CtsNetUtils are doing the same thing to set/get private DNS related settings. To prevent making the duplication code in two places, move the body to frameworks/libs/net and call it. Bug: 185311744 Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk Change-Id: I3272c825b86ec30c3d0bf4097088c653e668461b
* Move UIDS_ALLOWED_ON_RESTRICTED_NETWORKS settingpaulhu2021-06-071-2/+2
| | | | | | | | | | | | | Now, PermissionMonitor reigster observer to listen the change from all users, but "uids allowed on restricted networks" should affect to all users instead of per each user. Thus, move the setting from Settings.Secure to Settings.Global. Bug: 189705071 Test: atest FrameworksNetTests Merged-In: Ibea354d8dda1f02652a193820f3f9eb573b9a956 Change-Id: Ibea354d8dda1f02652a193820f3f9eb573b9a956
* Update allowed on restricted networks getter/setterpaulhu2021-05-271-45/+48
| | | | | | | | | | | | As API review feedback, setting allowed on restricted networks should be by uid instead of package name for security reason. Thus, update the getter/setter to return/accept set of uids. Bug: 188085693 Test: atest FrameworksNetTests Merged-In: I979bf98075e6c9c0ed7e891582843fddb62643cb Change-Id: I979bf98075e6c9c0ed7e891582843fddb62643cb
* Address [set|get]RestrictedAllowedApps API review feedbackpaulhu2021-05-141-18/+14
| | | | | | | | | | - 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
* Update mobile data preference getter/setterpaulhu2021-05-131-11/+31
| | | | | | | | | | | To satisfy OEM's requests, setting mobile data preference should be by uid. Thus, update the getter/setter to return/accept set of uids that need to apply mobile data preference. Bug: 171872461 Test: atest FrameworksNetTests Change-Id: Id44efd2a6d820867f4405426c91e65b9ef155898
* Add RESTRICTED_ALLOWED_APPS settingpaulhu2021-05-131-0/+54
| | | | | | | | | This setting is OEM upstream requirement for third party apps using restricted networks. Bug: 185149952 Test: atests FrameworksNetTests Change-Id: I5e16b46cf2935f38ee1e516bb8b85fa487cf9f61
* Update PrivateDnsMode from StringDef to IntDeflucaslin2021-05-051-6/+94
| | | | | | | | | | | | | | Update PrivateDnsMode from StringDef to IntDef because IntDef is the normal way of representing multiple choices in public API. Also update other related files. Bug: 185311744 Test: 1. make update-api 2. atest FrameworksNetTests CtsNetTestCases CtsNetTestCasesLatestSdk 3. atest FrameworksServicesTests:DevicePolicyManagerTest Change-Id: I23e7ec140066979726d769cabc5f7057bb2167e6 Merged-In: I23e7ec140066979726d769cabc5f7057bb2167e6 (Cherry-picked from ag/14227609)
* Add MOBILE_DATA_PREFERRED_APPS settingpaulhu2021-03-261-0/+33
| | | | | | | | | | This setting is OEM upstream requirement for mobile data preferred apps feature. Bug: 171872461 Test: atest FrameworksNetTests Merged-In: Ic5e0515b2b948de3d333c8d8e073d0b15514562a Change-Id: Iba17bf68cffbe39d1c08ad94364b41bbf851bf57
* Expose ConnectivitySettingsManager as module-lib APIpaulhu2021-03-261-1/+656
| | | | | | | | | | Have getter/setter methods for external modules that can get/set the setting values. Bug: 182538166 Test: atest FrameworksNetTests Merged-In: I82225a43f95e3e1d3e52c4e7a0fc541c0087292e Change-Id: I61cb00216494e35b6e0dfe444b177cad36ad8afb
* Add more connectivity module settingspaulhu2021-03-181-0/+195
| | | | | | | | | Add more connectivity module settings and update all references to ConnectivitySettingsManager. Bug: 182538166 Test: atest FrameworksNetTests Change-Id: Ie96fbd0996ed3acb37099b6270bf3d4c2e558e9a
* Add ConnectivitySettingsManagerpaulhu2021-03-171-0/+46
This class is used to manager the connectivity module related settings. Bug: 182538166 Test: make Change-Id: I5e02e719ce0d305d7c8a45fefb850d7b981f07eb