summaryrefslogtreecommitdiff
path: root/tests/net/java/com
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge "Revert "[RFPM03] Check permission by uid."" am: 50bb631f03 am: ↵Paul Hu2020-08-201-86/+122
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c6c7cdb81 am: 45f2280d3a am: 1c66746130 am: ad67c0bbd9 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654 Change-Id: I3f6108034a4dfcbae9e5d5cf466e924229f33965
| * | | | | | Merge "Revert "[RFPM03] Check permission by uid."" am: 50bb631f03 am: 6c6c7cdb81Paul Hu2020-08-201-86/+122
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654 Change-Id: I393e91873923d7b6601d4e8c863cca6986f66f23
| | * | | | | Merge "Revert "[RFPM03] Check permission by uid.""Paul Hu2020-08-201-86/+122
| | |\ \ \ \ \
| | | * | | | | Revert "[RFPM03] Check permission by uid."Paul Hu2020-08-201-86/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ab4ad20eef8cb3176801f3a2a08ae635d869fa53. Reason for revert: Regression in SW. Bug:162499840 Change-Id: Ic93e762e41a728f66e200e5bc8e40ebe4c7b44f7
* | | | | | | | Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: ↵Paul Hu2020-08-201-59/+65
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aad5331ee2 am: 4143779e4b am: bcc1edb897 am: 4f3df4b152 am: 3ad1384309 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653 Change-Id: Id24e6a79676aebfcc61f9b507ad8fca25b35b424
| * | | | | | | Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: ↵Paul Hu2020-08-201-59/+65
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aad5331ee2 am: 4143779e4b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653 Change-Id: Ifa19cb8fce8dca66ac5f4ecc7737c1c095b7b35b
| | * | | | | | Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method""Paul Hu2020-08-201-59/+65
| | |\| | | | |
| | | * | | | | Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"Paul Hu2020-08-201-59/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 29100e889200c6d74ee7a120a1c356e2c89e48e2. Reason for revert: Regression in SW. Bug:162499840 Change-Id: I96bf28ffc9f2d8f3838cb6d2dac16f89a70177ed
* | | | | | | | Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: f8115452a7 am: ↵Paul Hu2020-08-201-49/+42
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 654c328426 am: 62160754cf am: 1f8fc11362 am: 5ded9f9cca Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652 Change-Id: I10a4be2a1b88ddcc67d0b3467f9288b9c36f3b18
| * | | | | | | Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: f8115452a7 am: ↵Paul Hu2020-08-201-49/+42
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 654c328426 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652 Change-Id: I9edf5bfaa9cbc037e87f5781ba07a2c87932f3aa
| | * | | | | | Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class""Paul Hu2020-08-201-49/+42
| | |\| | | | |
| | | * | | | | Revert "[RFPM05] Add UidNetdPermissionInfo class"Paul Hu2020-08-201-49/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 26263b3cd0f6855f6e38ab22da7d8e883133a5f4. Reason for revert: Regression in SW. Bug:162499840 Change-Id: I0e846efcc4fc06b53d97b2007e0d8e8f97c6ac10
* | | | | | | | Merge "Skip RAT type listener registration if IMSI is not available"Junyu Lai2020-08-201-0/+56
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | |
| * | | | | | | Skip RAT type listener registration if IMSI is not availablejunyulai2020-08-191-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 Change-Id: I408379b3c432d9e62e0837d6b4f6551cc7838e29
* | | | | | | | Merge "Rename Kotlin util files to not include the Kt suffix" am: b1a3247ab4 ↵Chalard Jean2020-08-137-40/+40
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 9da93f616e am: 70572e1b82 am: a0794291ec am: a822fb621b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084 Change-Id: I89b50df2ea418f609d4ce7919f3154f54a1379b1
| * | | | | | | Merge "Rename Kotlin util files to not include the Kt suffix" am: b1a3247ab4 ↵Chalard Jean2020-08-137-40/+40
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 9da93f616e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084 Change-Id: I6362695120ea8669e1da84bb686e886b85efd6a3
| | * | | | | | Merge "Rename Kotlin util files to not include the Kt suffix"Chalard Jean2020-08-137-40/+40
| | |\ \ \ \ \ \
| | | * | | | | | Rename Kotlin util files to not include the Kt suffixChalard Jean2020-08-127-40/+40
| | | | |_|_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers don't care what language the utilities are written in Test: builds Change-Id: Ie212144f36c50db223c05f3fcb6bad745842cb5e
* | | | | | | | Merge "Update language to comply with Android's inclusive language guidance" ↵Chiachang Wang2020-08-121-11/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 2dd299c5db am: 0e7aefd000 am: 139402e852 am: 7ca59bc74f am: c70025945b Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156 Change-Id: Ib455b42f7f360b75a295f86fd5166125fd0f69aa
| * | | | | | | Merge "Update language to comply with Android's inclusive language guidance" ↵Chiachang Wang2020-08-121-11/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 2dd299c5db am: 0e7aefd000 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156 Change-Id: Ibe13b2dad841e2ade2762558d1c3978a89cb825d
| | * | | | | | Merge "Update language to comply with Android's inclusive language guidance"Chiachang Wang2020-08-121-11/+11
| | |\ \ \ \ \ \
| | | * | | | | | Update language to comply with Android's inclusive language guidanceChiachang Wang2020-08-121-11/+11
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference. Bug: 161896447 Test: m ; atest FrameworkNetTests Change-Id: Ib6b4c9526992c31e05e82be80e2b9b86bc0b57ef
* | | | / / / / Merge "[RFPM05] Add UidNetdPermissionInfo class" am: 06697e0c43 am: ↵Paul Hu2020-08-121-42/+49
|\| | | | | | | | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f23a7a2d14 am: 30c2dc100e am: 9a46adade5 am: fc9c753145 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322556 Change-Id: Ibf808ce55a63335a287c34fefee8a0bf50105db4
| * | | | | | Merge "[RFPM05] Add UidNetdPermissionInfo class" am: 06697e0c43 am: f23a7a2d14Paul Hu2020-08-121-42/+49
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322556 Change-Id: I0878281e2033f093f3b9cbf608c30c44bdd99278
| | * | | | | Merge "[RFPM05] Add UidNetdPermissionInfo class"Paul Hu2020-08-121-42/+49
| | |\ \ \ \ \ | | | |/ / / / | | |/| / / / | | | |/ / /
| | | * / / [RFPM05] Add UidNetdPermissionInfo classpaulhu2020-08-121-42/+49
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add UidNetdPermissionInfo class to store netd permission info of each uid. Use the bit mask for combining all netd permission into one value which can update and get the uid permission easily. Moreover, aosp/1340042 add carryover package info into this class which centralizes all netd permissions relevant data. Bug: 132784544 Test: atest FrameworksNetTests Change-Id: I3b81ea2a5017e8f4d0d603144a33c9b08640d7ba
* | | | | Merge "Resolve the endpoint in legacy VPN" am: 429b59c8a4 am: fc546021bb am: ↵Chalard Jean2020-08-061-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4820e9d4e4 am: 9da9925389 am: 085726421e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496 Change-Id: I90bec6d85706fa9b2f9a01f81701138a54347005
| * | | | Merge "Resolve the endpoint in legacy VPN" am: 429b59c8a4 am: fc546021bbChalard Jean2020-08-061-2/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382496 Change-Id: If649ab2763c9971c25af7732b32e97bfd50fb6f0
| | * | | Merge "Resolve the endpoint in legacy VPN"Chalard Jean2020-08-061-2/+0
| | |\ \ \
| | | * | | Resolve the endpoint in legacy VPNChalard Jean2020-08-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds code to resolve the endpoint in the legacy VPN runner if it was specified as a hostname, and enables the previously added test that was disabled because this was broken until this patch. See the linked bug for details. This patch uses the async DNS API to do the resolution. This lets the resolution be fully cancellable, though the code is more complex than with the non-interruptible getByName. Test: VpnTest and in particular VpnTest#testStartRacoon Fixes the test meant to test this Also manual testing that resolution of a real hostname works as expected, that failure to resolve returns correctly, and that cancellation/interruption will unblock the thread and terminate immediately. Bug: 158974172 Change-Id: I714985f3c7919dad9c1854830c50f29c1f94a21e
* | | | | | Merge "Add a test for starting the legacy VPN." am: 869d4f597d am: ↵Chalard Jean2020-08-061-9/+182
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6926df6314 am: 4136a41652 am: 4d64450516 am: ca286d76ce Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896 Change-Id: I96f4bbb9b109e3e5813d083bed1989d88fb156b8
| * | | | | Merge "Add a test for starting the legacy VPN." am: 869d4f597d am: 6926df6314Chalard Jean2020-08-061-9/+182
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372896 Change-Id: Idc49c61cc0547cdabe37cfa19b685c2beeda473b
| | * | | | Merge "Add a test for starting the legacy VPN."Chalard Jean2020-08-061-9/+182
| | |\| | | | | | |/ / | | |/| |
| | | * | Add a test for starting the legacy VPN.Chalard Jean2020-08-061-9/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The legacy VPN has, among many parameters, a host to connect to. This host can be specified as a numeric address, or as a hostname. When it's a name, resolution is required. Currently, name resolution is performed by the native VPN daemons racoon and mtpd. When a hostname is used, the framework does not know the IP address of the VPN server and does not add a throw route for the VPN server IP address. On older kernels this does not matter because the legacy PPP kernel code binds the PPP socket to the right network, but on newer devices that use the upstream PPP code, this does not work. See b/133797637. This patch instruments the legacy VPN code so that it can be run in tests, and uses this instrumentation to simulate passing a configuration that contains a host, and verifies that the arguments passed to the mptd and racoon daemons receive the expected server address, and that the expected throw route is correctly installed. It then adds two tests : one specifying the server as a numeric address, and one as a hostname. As the resolution is currently broken, the latter of these tests is added disabled, and the followup fix to the issue enables it. This test is basic and very targeted, but it's what we need right now. Also there are plans to remove this entire code path in S, so the test being ad-hoc is not much of a problem. Test: this Bug: 158974172 Change-Id: I420b63db03a58e8c67a98a85c9f4c2d6ed7ad078 (cherry picked from commit 45846a03051a13d667732288e457eab4336a691e)
* | | | | Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method" am: 89ca9dd063 ↵Paul Hu2020-08-031-65/+59
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b541b5fecf am: c5241a3cd1 am: 9675f2fa72 am: 6a065b325e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1321322 Change-Id: I6b0e7531effbb8c627697b3d7c475de3394b7f52
| * | | | Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method" am: 89ca9dd063 ↵Paul Hu2020-08-031-65/+59
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: b541b5fecf Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1321322 Change-Id: Id91c6de75e524080d15e2508007d5de997c7fd92
| | * | | Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method"Paul Hu2020-08-031-65/+59
| | |\ \ \
| | | * | | [RFPM04] Adjust hasRestrictedNetworkPermission methodpaulhu2020-07-291-65/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two parts in hasRestrictedNetworkPermission method. One is carryover package check and one is uid permission check. Seperate carryover package check part to another method to be clearer the usage of hasRestrictedNetworkPermission method. Bug: 132784544 Test: atest FrameworksNetTests Change-Id: Iab0609fcaa52acb0dfcb31ca957f22bfe8d62392
| | * | | | Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and ↵Peter Wang2020-07-311-2/+2
| | |\ \ \ \ | | | |_|/ / | | |/| | | | | | | | | guard with permission"
| | | * | | [Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList andPeter Wang2020-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guard with permission Bug: 150878235 Fix: 150878235 Test: Build Change-Id: I7f3b1f5170e032336d9b39b322c49e2b92573586 Merged-In: I7f3b1f5170e032336d9b39b322c49e2b92573586
* | | | | | Merge "Move utils from network stack to libs." am: 21be4fabb5 am: bfadef51df ↵Chalard Jean2020-07-311-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 7a3454f47e am: 29826a7a2f am: c970ae31d6 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083 Change-Id: I55c36bb60ea81f86daa193e9dff738846984e1e7
| * | | | | Merge "Move utils from network stack to libs." am: 21be4fabb5 am: bfadef51dfChalard Jean2020-07-311-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083 Change-Id: Ia163bc416e16ce56fc96855c1111a9905b712843
| | * | | | Move utils from network stack to libs.Chalard Jean2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This package is using some common utilities from a library that used to live in the network stack. A better home for these utilities is frameworks/libs, so this topic moves the files ther and also changes the package of some utilities. See aosp/1350222 and aosp/1350182 for a detailed description of the specific files that moved. Test: checkbuild Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
* | | | | | Merge "[RFPM03] Check permission by uid." am: ce4d7d9493 am: a33a3a3a74 am: ↵Paul Hu2020-07-291-122/+86
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 608d002021 am: f6d7721f63 am: c6ec125732 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375 Change-Id: Iee10248986fe1bda9fa97e6ae387e5ca4ec557c6
| * | | | | Merge "[RFPM03] Check permission by uid." am: ce4d7d9493 am: a33a3a3a74Paul Hu2020-07-291-122/+86
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375 Change-Id: I80406643e4797b1e269b4f7c5711339371fa533b
| | * | | | Merge "[RFPM03] Check permission by uid."Paul Hu2020-07-291-122/+86
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | [RFPM03] Check permission by uid.paulhu2020-07-281-122/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PermissionMonitor check permission by each package name but only update the uid permission to netd. It's better to check permission by uid directly. Thus, use ActivityManager#checkUidPermission to check permissions for each uid. Bug: 132784544 Test: atest FrameworksNetTests Change-Id: I057d34383b4dc408b2773e4c6b146774ba0c5eb2
* | | | | | Merge "Gracefully handle integer overflows." am: a308f79353 am: aeddf47458 ↵Junyu Lai2020-07-291-13/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a2a1e552cf am: 85c6bdbbeb am: 076ffecd31 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217 Change-Id: I7c04b66f75f64c214bd0c8d27bb5dbeda13094ce
| * | | | | Merge "Gracefully handle integer overflows." am: a308f79353 am: aeddf47458Junyu Lai2020-07-291-13/+16
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217 Change-Id: I0bba17d0367ebf4e1c868a8cc7471366bc7a4408
| | * | | | Merge "Gracefully handle integer overflows."Junyu Lai2020-07-291-13/+16
| | |\ \ \ \