summaryrefslogtreecommitdiff
path: root/packages/Connectivity/tests/unit/java
Commit message (Collapse)AuthorAgeFilesLines
* packages/Connectivity moved to packages/modules/ConnectivityBaligh Uddin2021-05-2460-33966/+0
| | | | | | BUG: 186628461 TEST: TH Change-Id: I2727e13dbe051162f23ef279ca11cd5cca1fc761
* Merge "Improve IKEv2/IPsec VPN by proposing more IPsec algorithms" am: ↵Yan Yan2021-05-212-28/+12
|\ | | | | | | | | | | | | | | 94a4cdd4e8 am: 7b8b5fd6de Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1690265 Change-Id: I0e467627fdbf70d6ec704f1f2be58223df9642ed
| * Merge "Improve IKEv2/IPsec VPN by proposing more IPsec algorithms"Yan Yan2021-05-212-28/+12
| |\
| | * Improve IKEv2/IPsec VPN by proposing more IPsec algorithmsYan Yan2021-05-212-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Check location permission for ConnDiags last." am: a376a93738 am: ↵Cody Kesting2021-05-201-6/+10
|\| | | | | | | | | | | | | | | | | | | | | | | 83b7dbfc1b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699069 Change-Id: I6ca0b27d9280e9246fbf6ea105f18d6f1d073388
| * | Merge "Check location permission for ConnDiags last."Cody Kesting2021-05-201-6/+10
| |\ \
| | * | Check location permission for ConnDiags last.Cody Kesting2021-05-171-6/+10
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add more unit tests for ConnectivityManager S APIs" into sc-dev am: ↵TreeHugger Robot2021-05-201-20/+28
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7a5dda8b84 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14640282 Change-Id: I578b566c5b73e06b9f675cbde6954dccbc0a5a57
| * \ \ Merge "Add more unit tests for ConnectivityManager S APIs" into sc-devTreeHugger Robot2021-05-201-20/+28
| |\ \ \
| | * | | Add more unit tests for ConnectivityManager S APIsJunyu Lai2021-05-191-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore-AOSP-First: Avoid merge conflict Test: atest android.net.ConnectivityManagerTest Bug: 188657173 Change-Id: I33612650eb89486a14fcfc440ba0c357f4bb513c
| * | | | Merge "Support to query TYPE_WIFI usage with subscriberId" into sc-devLes Lee2021-05-201-18/+62
| |\ \ \ \
| | * | | | Support to query TYPE_WIFI usage with subscriberIdlesl2021-05-191-18/+62
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" into ↵Paul Hu2021-05-201-17/+104
| |\ \ \ \ | | | | | | | | | | | | | | | | | | sc-dev
| | * | | | Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observerPaul Hu2021-05-181-17/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from ↵Paul Hu2021-05-201-0/+111
| |\| | | | | | | | | | | | | | | | | | | | | | PermissionMonitor" into sc-dev
| | * | | | Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitorPaul Hu2021-05-181-0/+111
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Merge "Add metered filter for API: buildTemplateCarrier" into sc-devLes Lee2021-05-191-22/+36
| |\ \ \ \
| | * | | | Add metered filter for API: buildTemplateCarrierlesl2021-05-191-22/+36
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Merge changes I3ba50cbd,I970ee365 into sc-devJunyu Lai2021-05-191-26/+27
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | * changes: [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots [FUI27] Fix internal naming of notifyNetworkStatus
| | * | | [FUI27] Fix internal naming of notifyNetworkStatusjunyulai2021-05-171-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: TH Bug: 174123988 Merged-In: I970ee365ca221956ee85788005d331374b5fa71a Change-Id: I970ee365ca221956ee85788005d331374b5fa71a (cherry-picked from aosp/1620539)
* | | | | Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" ↵Nikita Iashchenko2021-05-182-6/+6
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a4466fbe61 am: 719831b948 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686657 Change-Id: I08b1d281a3b71556d783b1d4f352bc7a4ba8e879
| * | | | Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework"Nikita Iashchenko2021-05-182-6/+6
| |\ \ \ \
| | * | | | Move IoUtils#deleteContents from CorePlatformApi set to frameworkNikita Iashchenko2021-05-132-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a part of internal core libraries cleanup move usages of IoUtils#deleteContents from CorePlatformApi set to framework. Bug: 154796679 Test: m update-api Change-Id: If7037029026b6753ab64be09aa52c40e04d5c7b1
* | | | | | Merge "Support to query TYPE_WIFI usage with subscriberId" am: ced78f535c ↵Les Lee2021-05-181-18/+62
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 812956f97d Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1608057 Change-Id: Ifeaab15fbf20b318bb7b35aa6b4604f21e2c98a1
| * | | | | Merge "Support to query TYPE_WIFI usage with subscriberId"Les Lee2021-05-181-18/+62
| |\ \ \ \ \
| | * | | | | Support to query TYPE_WIFI usage with subscriberIdlesl2021-05-161-18/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Merge "Add metered filter for API: buildTemplateCarrier" am: 287dcfbc80 am: ↵Les Lee2021-05-181-22/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 94fa18312d Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699687 Change-Id: I46d8d8f0d9b83fb0a817a3455cbbc28d558b871c
| * | | | | | Merge "Add metered filter for API: buildTemplateCarrier"Les Lee2021-05-181-22/+36
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | |
| | * | | | | Add metered filter for API: buildTemplateCarrierlesl2021-05-141-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Merge "Allow unprivileged NetworkCallbacks to see other UIDs' networks." ↵Lorenzo Colitti2021-05-181-0/+118
|\ \ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into sc-dev am: 846ae25be5 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14597477 Change-Id: I83b704af8a5ee4a132030e973d301539c2e57fc3
| * | | | | | Allow unprivileged NetworkCallbacks to see other UIDs' networks.Lorenzo Colitti2021-05-181-0/+118
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Merge "QOS filter matching support based on remote address and port number ↵Jayachandran Chinnakkannu2021-05-141-5/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for connected sockets" am: 853bb0df91 am: 5abb533da2 am: faf4ba40ba Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687813 Change-Id: I04ada71bdea2c3851fd6925126f6ff2bfdecad2c
* | \ \ \ \ \ Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" am: ↵Paul Hu2021-05-171-17/+104
|\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a199e8bf27 am: eaaa0cbce1 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689573 Change-Id: Ide30d62481724f0c93b6302ddc871ef7fe10cfd8
| * | | | | | Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer"Paul Hu2021-05-171-17/+104
| |\ \ \ \ \ \
| | * | | | | | Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observerpaulhu2021-05-161-17/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
* | | | | | | | Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from ↵Paul Hu2021-05-171-0/+111
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PermissionMonitor" am: 59dc4f0ac2 am: 9eec752260 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689572 Change-Id: I216224011720d64316b9801ef54859b8de2bdb89
| * | | | | | | Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor"Paul Hu2021-05-171-0/+111
| |\| | | | | | | | |_|_|_|/ / | |/| | | | |
| | * | | | | Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitorpaulhu2021-05-161-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
* | | | | | | Merge changes I3ba50cbd,I970ee365 am: 37f2408143 am: ed64c29783Junyu Lai2021-05-151-26/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620859 Change-Id: If9a3e37e5359b955e330002d81cbeb48f90ee22b
| * | | | | | Merge changes I3ba50cbd,I970ee365Junyu Lai2021-05-151-26/+27
| |\ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * changes: [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots [FUI27] Fix internal naming of notifyNetworkStatus
| | * | | | | [FUI27] Fix internal naming of notifyNetworkStatusjunyulai2021-05-141-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: TH Bug: 174123988 Change-Id: I970ee365ca221956ee85788005d331374b5fa71a
* | | | | | | Merge "QOS filter matching support based on remote address and port number ↵Jayachandran Chinnakkannu2021-05-141-5/+5
|\| | | | | | | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for connected sockets" am: 853bb0df91 am: 5abb533da2 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687813 Change-Id: I32f71d0bc49e6a348d64cb0adb8abf421677f306
| * | | | | Merge "QOS filter matching support based on remote address and port number ↵Jayachandran Chinnakkannu2021-05-141-5/+5
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | for connected sockets"
| | * | | | QOS filter matching support based on remote address and port number for ↵Jayachandran C2021-05-131-5/+5
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | connected sockets This CL adds APIs for telephony to perform filter matching based on remote address if the socket is connected. Additional checks will be performed on the state of socket to avoid the future callbacks in a separate CL. Bug: 181916576 Test: Manually verified in live T-Mobile network atest ConnectivityServiceTest atest com.android.internal.telephony.dataconnection.QosCallbackTrackerTest Change-Id: I6fbd4e84c76bc4acbf4e59f06f8e86e0237bae29
* | | | | Merge "[FUI26] Address comments on aosp/1560408" am: c1e493f98d am: ↵Junyu Lai2021-05-141-62/+49
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1befdd5001 am: c25bc707bc Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1618845 Change-Id: I8c62d218953027ee2fb5426ddacae5a6f8bb6c73
| * | | | [FUI26] Address comments on aosp/1560408junyulai2021-05-141-62/+49
| | |/ / | |/| | | | | | | | | | | | | | | | | | Test: TH Bug: 174123988 Change-Id: I949eeb8903e903d8ede90521442b1f917d5cdfeb
| * | | Rename *Iface* APIs to *Interface*Aaron Huang2021-05-141-6/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address API review feedback, other APIs have been refering to these as "interface" instead of "iface" so migrate the APIs named *Iface* to *Interface*. (cherry-picked from ag/14326779) Bug: 183972554 Test: atest android.net.UnderlyingNetworkInfoTest Merged-In: I38b476e762fb57fa88c4a789092d0af6f5330d80 Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
| * / Do not automatically redact TransportInfo objects.Lorenzo Colitti2021-05-131-17/+74
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, NetworkCapabilities always redacts the TransportInfo objects it contains whenever a defensive copy is made. This makes it impossible to make a defensive copy on a TransportInfo parcelled from another process without redacting it. Stop redacting by default; instead rely on ConnectivityService explicitly calling NetworkCapabilities' redacting constructor when it returns a NetworkCapabilities object to an app via a callback or synchronous call. This is currently done by - createWithLocationInfoSanitizedIfNecessaryWhenParceled, which is called from callCallbackForRequest, getNetworkCapabilities, and getDefaultNetworkCapabilitiesForUser. - getNetworkCapabilitiesWithoutUids, which is used when sending ConnectivityDiagnosticsManager callbacks. In this method, unconditionally redact all information, which is what the code did previously due to the default redaction setting for empty NetworkCapabilities objects being REDACT_ALL. Bug: 183938194 Test: atest NetworkCapabilitiesTest Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82
| * Move net unit tests to packages/ConnectivityRemi NGUYEN VAN2021-05-1359-0/+33077
| | | | | | | | | | | | | | | Move the tests together with packages/Connectivity code, so both can be moved to packages/modules/Connectivity together. Also reorganize unit tests in a unit/ directory, as other tests (integration/, common/ etc.) have been added in tests/net since they were created. This makes the directory structure consistent. Test: atest FrameworksNetTests Bug: 187814163 Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
* Make yield-to-bad-wifi behavior backward compatible with RChalard Jean2021-05-141-46/+128
| | | | | | | | | | | | | | | | Yielding cell wins to exiting wifi (whether good or bad). It loses to bad wifi that's not exiting. In R, yielding to bad wifi only affects wifis that are unvalidated, but a wifi that is exiting should still be dropped in favor of a cell that yields to bad wifi. I had misunderstood the policy and implemented it wrong. Now it's implemented right, and has careful tests. Test: new tests for this Bug: 186458024 Change-Id: Ib8637100d491e72a2edb837584ce55b7dda58524