summaryrefslogtreecommitdiff
path: root/tests/net/java/com
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge "Replace NotificationManager @hide APIs"Paul Hu2020-10-303-40/+45
| |\ \
| | * | Replace NotificationManager @hide APIspaulhu2020-10-283-40/+45
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Connectivity service module is using some NotificationManager @hide APIs but they are not able to call after CS become a mainline module. Thus, replace them with similar System APIs. Bug: 170593746 Test: atest FrameworksNetTests Change-Id: I2644867cfc01d8d651c7029134294a9d44fdb471
* | | Merge changes from topic ↵Xiao Ma2020-10-291-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | "revert-1353490-revert-1323251-ipv6_prov_loss_quirk_parcelable-DVBHZDYMHA-MDHWFKJABZ" am: 8e8460b4b3 am: aa24ca0106 am: a88adc48fc am: f3f345ef59 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460265 Change-Id: I5c6bf738b8fc24c65e0ac256ed4b595cfb8a34fe
| * | Merge changes from topic ↵Xiao Ma2020-10-291-1/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | "revert-1353490-revert-1323251-ipv6_prov_loss_quirk_parcelable-DVBHZDYMHA-MDHWFKJABZ" * changes: Add jarjar rule for IPv6ProvisioningLossQuirk. Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes"""
| | * | Add jarjar rule for IPv6ProvisioningLossQuirk.Xiao Ma2020-10-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new stable parcelable IPv6ProvisioningLossQuirk added in network stack module, which is used to record the network quirk info which causes IPv6 provisioning loss, e.g. the router lifetime in RA is 0 and the default route will be removed from LinkProperties. Previously this change breaks CtsStrictJavaPackagesTestCases due to a jarjar rule is missed. Also rename the package name based on the revert change. Also include slight stable AIDL package and variable rename. Bug: 157534516 Test: atest CtsStrictJavaPackagesTestCases FrameworksNetTests Change-Id: Ic2f6b75beefb574f7e2fb4c157667e7734eccd05
* | | | Revert "Revert "Test IPv6ProvisioningLossParcelable in the ↵Xiao Ma2020-10-291-1/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkAttributes""" am: 42c643a2e5 am: 1145cdcefe am: e26d6ebc1c am: 83d8f80c39 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460264 Change-Id: I0c28f689e056dc4ac5d6750c9f5c74ce49c8a103
| * \ \ \ Revert "Revert "Test IPv6ProvisioningLossParcelable in the ↵Xiao Ma2020-10-291-1/+4
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | | | | | NetworkAttributes""" am: 42c643a2e5 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460264 Change-Id: Ie13b2bb8037d85ab4782e06cfc31e108397fc78b
| | * | Revert "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttributes"""Xiao Ma2020-10-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test IPv6ProvisioningLossParcelable in the NetworkAttributes. Bug: 157534516 Test: atest NetworkStackTests This reverts commit_3740bfadadaaf268f92aaf35dd92e4ce432b39cb Reason for revert: Roll forward the previous change, as the CtsStrictJavaPackagesTestCases breakage has been addressed by adding the jarjar rule in wifi module. Change-Id: Ib4d70ce557cad98643c811b219f51e9b68179ee8
* | | | Merge changes I6a51d803,I162fae5c am: b524e17519 am: 18013cefe3 am: ↵Chiachang Wang2020-10-291-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 84aa44d22b am: 676c21cf05 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473228 Change-Id: I40ff3cfcb4dbe7dc036eaa87df2fa192aee3f016
| * | | Merge changes I6a51d803,I162fae5cChiachang Wang2020-10-291-7/+7
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Replace hidden NMS API for setting MTU Replace hidden NMS default network configuration API
| | * | | Replace hidden NMS default network configuration APIChiachang Wang2020-10-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the hidden setDefaultNetId and clearDefaultNetId NMS APIs with accessing INetd directly for the incoming ConnectivityService mainline. Bug: 170598012 Test: atest FrameworksNetTests Test: manually connect and disconnect wifi Change-Id: I162fae5ca444207a037e5ac4bf8fa0a77a648ca1
* | | | | Merge "Replace hidden NMS interface to network API" am: 2a40529747 am: ↵Chiachang Wang2020-10-291-3/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 667b09128d am: a6b1b5722a am: 30b5ebb272 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473224 Change-Id: Id97da9dda9bed8c182ea2fcd92c79d94bc619d52
| * | | | Merge "Replace hidden NMS interface to network API"Chiachang Wang2020-10-291-3/+7
| |\| | | | | |_|/ | |/| |
| | * | Replace hidden NMS interface to network APIChiachang Wang2020-10-281-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the hidden NMS addInterfaceToNetwork and removeInterfaceFromNetwork with calling INetd directly for incoming ConnectivityService mainline. Bug: 170598012 Test: atest FrameworksNetTests Test: manually connect and disconnect network Change-Id: I0f1f866be2f8084b992b340aeabfb5d62420686b
* | | | Merge "Using Context#getSystemService instead of ↵Lucas Lin2020-10-231-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ServiceManager#checkService" am: d769b3863e am: bb6fc081c2 am: 1dcea14b37 am: 58fd9a8f5e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1463902 Change-Id: If50e3be30fa1ba34c945736ed9a8a83fbe122b48
| * | | Using Context#getSystemService instead of ServiceManager#checkServicelucaslin2020-10-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConnectivityService is going to be a mainline module, it can only use formal APIs or @SystemApi. So use public API - Context#getSystemService() instead of hidden API - ServiceManager#checkService(). Bug: 170598012 Test: atest FrameworksNetTests Change-Id: I9824caa7aec57e70f0ba405fcce39f9bc068732d
* | | | Merge "Do not use hidden SystemProperties.set" am: 8c6ec17bac am: d7146b6742 ↵Chiachang Wang2020-10-211-8/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 988643b724 am: 357cd1d2a0 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460971 Change-Id: Ie125f2d0d5605180189fa1dfbef70286ad79c23e
| * | | Merge "Do not use hidden SystemProperties.set"Chiachang Wang2020-10-211-8/+11
| |\| |
| | * | Do not use hidden SystemProperties.setChiachang Wang2020-10-201-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConnectivityService is going to become a mainline module, and it will not able to use hidden method anymore. Thus, use alternative new sysprop as API to control the tcp init rwnd value. Bug: 170917042 Test: adb shell getprop net.tcp_def_init_rwnd and check if value is set correctly Test: atest FrameworksNetTests Change-Id: If9e99c88de50b6829721b0dfacc430a3b53c7728
* | | | Merge "Remove unused MockableSystemProperties from DnsManager constructor" ↵Chiachang Wang2020-10-201-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 3e23d7271b am: 250a9d3d20 am: 04dede7600 am: 8a60923e76 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466231 Change-Id: Id0b0b33e8156831222968ca68f289d206787d635
| * | | Remove unused MockableSystemProperties from DnsManager constructorChiachang Wang2020-10-201-2/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DnsManager does not use MockableSystemProperties to communicate with netd to configure the dns server anymore. ConnectivityService does not need to take it into DnsManager as a parameter. Thus, clean up the unused code. Bug: 33308258 Test: atest FrameworksNetTests Change-Id: I2ac89944391f7d1fd5d67f26cf7f2b11a4a4cf84
| * | Merge "Create service-connectivity.jar"Aaron Huang2020-10-201-1/+1
| |\ \
| | * | Create service-connectivity.jarAaron Huang2020-10-161-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new target service-connectivity to split ConnectivityService from services.core. Add ConnectivityServiceInitializer for initializing ConnectivityService and add systemReady() in ConnectivityManager so that SystemServer can call systemReady() through ConnectivityManager which won't change current behavior. Bug: 158268939 Test: make target-java, make host-java atest FrameworksNetIntegrationTests atest FrameworksNetTests make, device can boot, atest CtsStrictJavaPackagesTestCases wifi and mobile data work. Change-Id: I99401772ba9c1c34adca20040da3c7c72d86ddd9 Merged-In: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
* | | Merge "Stop setting the legacy net.dnsX system properties" am: 61da71aa03 ↵Bernie Innocenti2020-10-161-6/+0
|\| | | | | | | | | | | | | | | | | | | | | | | am: 5b53e5f4d6 am: 1eb54fa910 am: d1c4e9aebe Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1229561 Change-Id: I78ef627fdf0312cf84de53aa8da5f0bca466a6f3
| * | Stop setting the legacy net.dnsX system propertiesChiachang Wang2020-10-161-6/+0
| |/ | | | | | | | | | | | | | | | | | | These have been locked down via SELinux for a while and thus they should be safe to delete at this point. Test: atest FrameworksNetTest Bug: 33308258 Bug: 148724751 Change-Id: I3a1e9c6ad92c8d2367e0048e5d6cd7d06bbc6e80
* | Create service-connectivity.jarAaron Huang2020-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new target service-connectivity to split ConnectivityService from services.core. Add ConnectivityServiceInitializer for initializing ConnectivityService and add systemReady() in ConnectivityManager so that SystemServer can call systemReady() through ConnectivityManager which won't change current behavior. Bug: 158268939 Test: make target-java, make host-java atest FrameworksNetIntegrationTests atest FrameworksNetTests make, device can boot, atest CtsStrictJavaPackagesTestCases wifi and mobile data work. Change-Id: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
* | Merge "Support dynamically update IMSI" am: 5d2e89e03d am: 9b8855c018 am: ↵Junyu Lai2020-10-131-11/+70
|\| | | | | | | | | | | | | | | 860b9660d7 am: 5537ae9221 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1418348 Change-Id: I5e5fc106aaab1b55302c38717cad9dbf1281baec
| * Merge "Support dynamically update IMSI"Junyu Lai2020-10-131-11/+70
| |\
| | * Support dynamically update IMSIjunyulai2020-10-121-11/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, NetworkStatsSubscriptionsMonitor will skip the listener registration until the IMSI is available to deal with SIM PIN locked case. However, this solution can only handle the case that IMSI changes from/to null. And it also relies on the assumption that IMSI never changes for a subId. Thus, support dynamically update IMSI to handle IMSI changes more robustly. This patch also address leftover comments at ag/12400327. Test: enable SIM PIN and manually test Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdChanged Test: ./out/host/linux-x86/bin/statsd_testdrive 10082 Bug: 160941101 Change-Id: I625a5b10ee4806f6fee99c2d9d6c5e7977ff785e
* | | Merge "Speculatively fix L2TP keepalive issues by reducing mtu" am: ↵Lorenzo Colitti2020-10-121-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | 392b52f49f am: 926d1ee880 am: 649c2bbbd8 am: 72432ab0f4 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399646 Change-Id: Iba6098badc018fa64b1c5fc20177b97a81a2e685
| * | Merge "Speculatively fix L2TP keepalive issues by reducing mtu"Lorenzo Colitti2020-10-121-1/+1
| |\ \
| | * | Speculatively fix L2TP keepalive issues by reducing mtuBenedict Wong2020-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reduces MTU/MRU values for racoon/pppd from 1400 to 1388 in an attempt to fix keepalive issues experienced in the field. Bug: 119076193 Test: Speculative change, original issues were not reproducible. Change-Id: I7731503260fdc8bcbc6c5fcda6991ead6fb7c52e
* | | | Merge "Update to positive logic to better match the method naming" am: ↵Chiachang Wang2020-10-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c7bc039ea am: a7136c6340 am: 50d0fa47ee am: ff3649cd5d Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450336 Change-Id: I111b7fa8eaecbec7e65357f7b9aa9b3f369d00c9
| * | | Update to positive logic to better match the method namingChiachang Wang2020-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method checkInterfacePresent seems that should return if the interface is present or not, but it actually return an opposite result. It may confuse the caller. E.g. The override method in VpnTest assume it always returns true in the test. It will fail the vpn start flow due to interface gone. Bug: 169215213 Test: atest FrameworksNetTess Change-Id: I3e9a64f0900336b8205674b94db68f090b4e9ff9
* | | | Refactoring: Use explicit methods for checking DO/POEran Messeri2020-10-061-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use USES_POLICY_PROFILE_OWNER / USES_POLICY_DEVICE_OWNER. Instead, use explicit methods for checking if the caller is the Device Owner or Profile Owner. USES_POLICY_PROFILE_OWNER is confusing since internally in the DevicePolicyManagerService, it implied a Device Owner is also a Profile Owner, which is not always what the caller expected. This is the first phase of the refactoring, removing external calles' dependency on these constants. The next phase will remove them internally completely in favour of an implementation that accesses mOwners directly. There are no functional changes in this CL. Bug: 163028934 Test: atest FrameworksServicesTests:DevicePolicyManagerTest Change-Id: I57c8465d190a3b4b130d57fd622cc93eaeb9c717
* | | | Merge "Provide more feedback to Settings when sessions fail" am: 9df1022c7a ↵Benedict Wong2020-09-251-0/+65
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: da78e17b0a am: 6d6a965712 am: d98ecc564a am: 0be82d4f4c Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645 Change-Id: I9a2a801100d3965d38e95c80ece5f4bc0b35cbc8
| * | | Merge "Provide more feedback to Settings when sessions fail"Benedict Wong2020-09-251-0/+65
| |\ \ \
| | * | | Provide more feedback to Settings when sessions failBenedict Wong2020-09-241-0/+65
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates the VPN state when IKEv2 sessions fail, and when configuration errors occur. Bug: 162289824 Test: Manual testing with IKEv2/PSK Change-Id: I2e8c6f421d2898f97b0ac422b2276edf9ef923f1
* | | | Merge "Skip stop if keepalive is already in stopping state" am: cb79f645d4 ↵Junyu Lai2020-09-241-0/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 65bcfe173f am: b3692b0365 am: c2cc33a706 am: 3c617422b5 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424190 Change-Id: I46a3c91dd56d806fc06388ad448bd641a0db0ae4
| * | | Skip stop if keepalive is already in stopping statejunyulai2020-09-171-0/+26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In current design, crash has been generated when stop function has been re-entered to catch unexpected behavior. However, it is possible to re-enter stop function if the network disconnection occurs after stopping. Thus, skip stop if keepalive is already in stopping state. Test: atest ConnectivityServiceTest#testNattSocketKeepalives \ --rerun-until-failure 60000 Bug: 167332570 Change-Id: Ic7068ad3dc990e957c37b8d87d48ebb6469b101f
| * | Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)Xin Li2020-08-311-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | Bug: 166295507 Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27 Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
* | \ \ Merge "Notify the keepalive is stopped after the slot has been released" am: ↵Junyu Lai2020-08-281-2/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d7c1854a8 am: b5e1feccbe am: 09ab7ad386 am: 4295a632b4 am: fcc06d418e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851 Change-Id: I86b9c01f99eaa9497acbd4e3e481c7330cf05667
| * | | | Merge "Notify the keepalive is stopped after the slot has been released" am: ↵Junyu Lai2020-08-281-2/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d7c1854a8 am: b5e1feccbe Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851 Change-Id: Icdd61fb39ebd14963f4ec6e591b3a245e6b999b2
| | * | | Merge "Notify the keepalive is stopped after the slot has been released"Junyu Lai2020-08-281-2/+0
| | |\ \ \
| | | * | | Notify the keepalive is stopped after the slot has been releasedjunyulai2020-08-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the callbacks of stopping were fired when stop procedure is started, because the upper layer apps only care about the reason of stopping instead of stopping result. Thus, there is no need to wait for the result comes back. However, this behavior generates races if apps want to re-start keepalive immediately since the resources are not released yet. Fix: 134891441 Fix: 140305589 Test: atest com.android.server.ConnectivityServiceTest#testPacketKeepalives \ --rerun-until-failure 1000 Change-Id: I987776a9211a50e964c4675b747bc10e203750f1
| * | | | | Merge "Skip RAT type listener registration if IMSI is not available" am: ↵Treehugger Robot2020-08-251-0/+56
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b74cd6eb18 am: 649667642c Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1409907 Change-Id: I34de6bc6dd862f8042489f60f4b6be76af7c961e
| | * | | | Merge "Skip RAT type listener registration if IMSI is not available"Treehugger Robot2020-08-251-0/+56
| | |\ \ \ \
| | | * | | | Skip RAT type listener registration if IMSI is not availablejunyulai2020-08-251-0/+56
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if SIM is inserted but IMSI is not available, such as SIM PIN locked state. Information of such SIM will still be available but IMSI is not. Which makes NetworkStatsSubscriptionMonitor failed to store IMSI locally for later RAT type query. Hence, NETWORK_TYPE_UNKNOWN is always returned for such SIM. Skip the registration until the IMSI is available. This is safe since there will be another onSubscriptionsChanged event when that happens. Test: enable SIM PIN and manually test Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable Test: ./out/host/linux-x86/bin/statsd_testdrive 10082 Bug: 160941101 Merged-In: I408379b3c432d9e62e0837d6b4f6551cc7838e29 Change-Id: I408379b3c432d9e62e0837d6b4f6551cc7838e29 (cherry-picked from ag/12400327)
* | | | | | Merge "Deprecated UserManager.getUsers(excludeDying) / added getAliveUsers()"TreeHugger Robot2020-08-263-5/+4
|\ \ \ \ \ \
| * | | | | | Deprecated UserManager.getUsers(excludeDying) / added getAliveUsers()Felipe Leme2020-08-243-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing method is confusing (the argument used to be called includeDying) and it puts the burden on the caller (which need to understand what the parameter means). Furthermore: - The majority of calls are for getUsers(excludeDying=true). - The calls for getUsers(excludeDying=false) are equivalent to calls to getUsers() Test: m Test: a VpnTest ConnectivityServiceTest PermissionMonitorTest Bug: 157921703 Change-Id: Ife767a40b7b7790ba28b5377046de822ddbf275c