Commit graph android_packages_modules_Co.../tests/net/java/com/android/server
Message SHA1
Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071

junyulai   commited 2020-07-16 15:32:01 +08:00
fef7a257be
Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: f9c09d213c am: 867430ae1d am: 4232af7e40 am: 41029e25ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: I6dfb1ec8e41adf39dce5361389e471e83425bc4e

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-07-10 06:17:03 +00:00
2e5f2ae310
Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: f9c09d213c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: If052329128326fba72ff27c024a2c6652b7bb1ef

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-07-10 05:41:05 +00:00
867430ae1d
Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: a1301d5850 am: 69b27184a7 am: 0527bf55f9 am: 90b89ee298
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203

Change-Id: Ifde023200e39995411932a44716a3eeb6daea542

Junyu Lai   authored and   Automerger Merge Worker   commited 2020-07-10 03:45:23 +00:00
d62ff0ac25
Revert "Attribute data usage to 5G for 5G non-standalone mode"
This reverts commit b04880e7ca.

Reason for revert: Revert and wait for the design is settled down.

Change-Id: I10fdfc37d6456678de1886698cd6ad08bf8aa810

Junyu Lai   commited 2020-07-10 03:43:19 +00:00
b20ac232a3
Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: a1301d5850
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203

Change-Id: I860b0226157ee31f0488d6b2252ae157e86dc5eb

Junyu Lai   authored and   Automerger Merge Worker   commited 2020-07-10 03:10:15 +00:00
69b27184a7
Attribute data usage to 5G for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498

Change-Id: I563df14500caeb3602b381479afaf5163ad8e6a1

junyulai   commited 2020-07-09 16:56:54 +08:00
b04880e7ca
Merge "[RFPM02] Add Dependencies class for injection in tests." am: 0cb16d1bb3 am: 7ce1646c8f am: 6f659fab51 am: 5ae4c18d16 am: cdddbb9536
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318291

Change-Id: I487c0a86d7b572b568c0b91b20624b234668e164

Paul Hu   authored and   Automerger Merge Worker   commited 2020-07-08 11:15:40 +00:00
4dfa5c3f58
Merge "[RFPM02] Add Dependencies class for injection in tests." am: 0cb16d1bb3 am: 7ce1646c8f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318291

Change-Id: If53e1521327c8d9f1fd2a5debb94c58ed25b2880

Paul Hu   authored and   Automerger Merge Worker   commited 2020-07-08 10:35:21 +00:00
6f659fab51
[RFPM02] Add Dependencies class for injection in tests.
Add Dependencies class in PermissionMonitor for injection
in tests easily.

Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ibb84d548908f7a955fa0ff206794486733259978

paulhu   commited 2020-07-08 15:30:42 +08:00
9883de0b7f
Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 2345894c5a am: 36824bfbd5 am: 3ace30afac am: e28bee0bc3 am: ba0530faa4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491

Change-Id: Ifd265eda7e5cd9c9d66cd19394bdb3c881dc5d16

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-07-01 06:08:18 +00:00
407167ae13
Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 2345894c5a am: 36824bfbd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491

Change-Id: Ibc8d633a6e04f7cd0f4c1a0d02ae586232cc0c6a

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-07-01 05:33:41 +00:00
3ace30afac
Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."
Revert "Add new network quirk parcelable in the NetworkAttributes."

Revert submission 1323251-ipv6_prov_loss_quirk_parcelable

Reason for revert: Breaks CtsStrictJavaPackagesTestCases
Reverted Changes:
I18e05c09f:Add new network quirk parcelable in the NetworkAtt...
I8dbff2377:Test IPv6ProvisioningLossParcelable in the Network...

Change-Id: Ie906919b344131cd768fbed787248d3caac2f74d

Chalard Jean   commited 2020-07-01 01:46:26 +00:00
24ed491f88
Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." am: 1f6c6479b9 am: 0df54895ad am: 400b2769fa am: 7eafd58b80 am: 9093db72d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322637

Change-Id: I39c6ea15ae901c7ad6a90bee5caa6064ac09847b

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-06-29 12:56:08 +00:00
bfac4769bc
Merge "[RFPM01] Merge package added/removed methods" am: fac73070cc am: 18da2dcce5 am: 3d1867013e am: 3a3bba00a6 am: 5e0c39fe2a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317236

Change-Id: I8b789c3cb90357a6d408565201d80a13fad92587

Paul Hu   authored and   Automerger Merge Worker   commited 2020-06-29 12:54:41 +00:00
f1cf6f4cf6
Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." am: 1f6c6479b9 am: 0df54895ad
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322637

Change-Id: Iaf964024c44e6b78ccb3b8fcf3fc131479747a81

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-06-29 12:17:26 +00:00
400b2769fa
Merge "[RFPM01] Merge package added/removed methods" am: fac73070cc am: 18da2dcce5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317236

Change-Id: Ida8f82d2ec5be1040a2bdf2aa65a94d53f68ea6c

Paul Hu   authored and   Automerger Merge Worker   commited 2020-06-29 12:16:47 +00:00
3d1867013e
Test IPv6ProvisioningLossParcelable in the NetworkAttributes.
Bug: 157534516
Test: atest FrameworksNetTests
Change-Id: I8dbff2377457bb8fd0f447be0a3cda9af952f2a2

Xiao Ma   commited 2020-06-29 11:57:32 +00:00
c2e0dc084a
[RFPM01] Merge package added/removed methods
There are two methods to handle package added/removed from
two differnt listeners. It can use one of listener to handle the
changes. Thus, keep PackageManagerInternal#PackageListObserver
but remove the listening from ConnectivityService.

Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ib2db85e4108f9fda731bf6667d0af0610fc79fea

paulhu   commited 2020-06-23 16:10:03 +08:00
e952ccfdf4
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev am: f6aeae7ca6 am: 4a5922b7e0 am: e6da8ac742 am: 23f9da3170
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11954238

Change-Id: I21129279b6ac94bebb55e0798e0da12ef5a0b5eb

TreeHugger Robot   authored and   Automerger Merge Worker   commited 2020-06-22 16:00:44 +00:00
8ea2167cfa
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev am: f6aeae7ca6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11954238

Change-Id: I1327794e6b8201d3c47c39838cfa516812cf273d

TreeHugger Robot   authored and   Automerger Merge Worker   commited 2020-06-22 15:18:45 +00:00
4a5922b7e0
Update DnsManagerTest for AIDL interface change
Check one more parameter enforceDnsUid in ResolverOptionsParcel in
DnsManagerTest.

Bug: 159587277
Test: atest
com.android.server.connectivity.DnsManagerTest#testSendDnsConfiguration

Change-Id: Ic53f42b968626294c851dac252a70769846ba427
Merged-In: Ic53f42b968626294c851dac252a70769846ba427

Ken Chen   authored and   Lorenzo Colitti   commited 2020-06-22 15:10:12 +00:00
a523111101
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-06-22 15:09:54 +00:00
f6aeae7ca6
Update DnsManagerTest for AIDL interface change
Check one more parameter enforceDnsUid in ResolverOptionsParcel in
DnsManagerTest.

Bug: 159587277
Test: atest
com.android.server.connectivity.DnsManagerTest#testSendDnsConfiguration

Change-Id: Ic53f42b968626294c851dac252a70769846ba427

Ken Chen   commited 2020-06-22 21:44:07 +08:00
bfce3bc8e3
Support DNS-over-TLS probes in NetworkDiagnostics
Probe DNS servers to see they support DNS-over-TLS. Use system
CAs to verify whether the certificates sent by DNS servers are
trusted or not. An error is thrown to cause the probe failed if
DNS servers send untrusted certificates.

Unlike the DnsResolver which doesn't verify the certificates
in opportunistic mode, all of the DoT probes from NetworkDiagnostics
check certificates.

DoT probes apply to the DNS servers gotten from LinkProperties
and the DoT servers gotten from PrivateDnsConfig whatever private
DNS mode is.

A common example in DNS strict mode:
.  DNS TLS dst{8.8.8.8} hostname{dns.google} src{192.168.43.2:48436} qtype{1} qname{815149-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (432ms)
F  DNS TLS dst{192.168.43.144} hostname{}: FAILED: java.net.ConnectException: failed to connect to /192.168.43.144 (port 853) from /192.168.43.2 (port 41770) after 2500ms: isConnected failed: ECONNREFUSED (Connection refused) (172ms)
.  DNS TLS dst{8.8.4.4} hostname{dns.google} src{192.168.43.2:37598} qtype{1} qname{759312-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (427ms)

An example when the CA is not trusted:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. (16ms)

An example when TCP/TLS handshake timeout:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: java.net.SocketTimeoutException: failed to connect to /8.8.8.8 (port 853) from /192.168.2.108 (port 45680) after 2500ms (2514ms)

Bug: 132925257
Bug: 118369977
Test: atest FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1011670
Merged-In: I1b54abed0e931ca4b8a97149459cde54da1c3d6f
Change-Id: I1b54abed0e931ca4b8a97149459cde54da1c3d6f

Mike Yu   commited 2020-06-22 08:57:49 +00:00
276e3eb5f3
Merge "Support DNS-over-TLS probes in NetworkDiagnostics" am: 64ffa1762f am: d7b0b95a3a am: cd9f6754d6 am: 929e39a37d am: c7888155ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1011670

Change-Id: Ica4a8e861c60ba00d7ff80f4a6564ac411a12f8b

Mike Yu   authored and   Automerger Merge Worker   commited 2020-06-22 07:33:11 +00:00
c187501eec
Merge "Support DNS-over-TLS probes in NetworkDiagnostics" am: 64ffa1762f am: d7b0b95a3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1011670

Change-Id: I25a06623d87e6971a9dac73bdea82a78fd6124d6

Mike Yu   authored and   Automerger Merge Worker   commited 2020-06-22 06:56:39 +00:00
cd9f6754d6
Support DNS-over-TLS probes in NetworkDiagnostics
Probe DNS servers to see they support DNS-over-TLS. Use system
CAs to verify whether the certificates sent by DNS servers are
trusted or not. An error is thrown to cause the probe failed if
DNS servers send untrusted certificates.

Unlike the DnsResolver which doesn't verify the certificates
in opportunistic mode, all of the DoT probes from NetworkDiagnostics
check certificates.

DoT probes apply to the DNS servers gotten from LinkProperties
and the DoT servers gotten from PrivateDnsConfig whatever private
DNS mode is.

A common example in DNS strict mode:
.  DNS TLS dst{8.8.8.8} hostname{dns.google} src{192.168.43.2:48436} qtype{1} qname{815149-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (432ms)
F  DNS TLS dst{192.168.43.144} hostname{}: FAILED: java.net.ConnectException: failed to connect to /192.168.43.144 (port 853) from /192.168.43.2 (port 41770) after 2500ms: isConnected failed: ECONNREFUSED (Connection refused) (172ms)
.  DNS TLS dst{8.8.4.4} hostname{dns.google} src{192.168.43.2:37598} qtype{1} qname{759312-android-ds.metric.gstatic.com}: SUCCEEDED: 1/1 NOERROR (427ms)

An example when the CA is not trusted:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. (16ms)

An example when TCP/TLS handshake timeout:
F  DNS TLS dst{8.8.8.8} hostname{dns.google}: FAILED: java.net.SocketTimeoutException: failed to connect to /8.8.8.8 (port 853) from /192.168.2.108 (port 45680) after 2500ms (2514ms)

Bug: 132925257
Bug: 118369977
Test: atest FrameworksNetTests
Change-Id: I1b54abed0e931ca4b8a97149459cde54da1c3d6f

Mike Yu   commited 2020-06-20 16:22:35 +08:00
d0e4221f64
Merge "Address comments from aosp/1298476" am: 6dc9a28b88 am: e2a6e9a49a am: 2ca334851b am: 7da3b91275 am: 365dc8a9aa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340040

Change-Id: I29d735d0edb861fc154568aaf0e63a4ae2f9b441

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-18 11:25:23 +00:00
8e04633f0b
Merge "Address comments from aosp/1298476" am: 6dc9a28b88 am: e2a6e9a49a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340040

Change-Id: I7b119758ac7cd65defdec77692957287af17566d

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-18 10:47:47 +00:00
2ca334851b
Address comments from aosp/1298476
This patch addresses the followings,
- Pass Looper to NetworkStatsSubscriptionsMonitor constructor
- Replace Looper with TestLooper in unit test
- Assert fail if result of condition check is not expected.

Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
      atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
Change-Id: Ibcaba2b38af80cc0ec9a4e428a3b3a1538bc4325

Aaron Huang   commited 2020-06-18 15:05:19 +08:00
50f06aca36
Merge "Dynamically enable/disable watch for RAT type changes" am: 2ad5b1419e am: 5410692469 am: 44324327a6 am: ac7a360b27 am: 8c24bb2562
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574

Change-Id: I0e19a6f752579b82682f5d8cfa3589657e23fd1f

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-18 04:51:54 +00:00
34d00fa803
Merge "Dynamically enable/disable watch for RAT type changes" am: 2ad5b1419e am: 5410692469
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574

Change-Id: I5a96774ad2104a6b03c9abab2b105b97195edea8

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-18 04:22:21 +00:00
44324327a6
Merge "Dynamically enable/disable watch for RAT type changes"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-06-18 03:51:51 +00:00
2ad5b1419e
Merge "Add unit test for NetworkStatsSubscriptionsMonitor"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-06-17 08:52:20 +00:00
4a4540dee6
Dynamically enable/disable watch for RAT type changes
Add ContentObserver to observe the status of
NETSTATS_COMBINE_SUBTYPE_ENABLED to determine that
NetworkStatsSubscriptionsMonitor start or stop
monitoring data usage per RAT type changes.

Bug: 154080515
Test: atest NetworkStatsServiceTest#testDynamicWatchForNetworkRatTypeChanges
Change-Id: I272d589633c9186b45753228b05aa0b40b7c7b89

Aaron Huang   authored and   Chalard Jean   commited 2020-06-17 17:09:10 +09:00
b412cf8212
Test extra info sent to NetworkMonitor
Test extra info sent to NetworkMonitor correctly if network
agent is created through new NetworkAgent constructor without
legacy network info taken as parameter.

Bug: 156173829
Test: atest FrameworkNetTests
Merged-In: I4f827664c528bea30cc957a0a617dd37693f4460
Change-Id: I4f827664c528bea30cc957a0a617dd37693f4460

Chiachang Wang   commited 2020-06-16 01:57:46 +00:00
593f1e8176
Merge "Test extra info sent to NetworkMonitor" am: cd192301a2 am: 8825abb697 am: bd4096a4b6 am: 6189d49c67 am: 9a096560bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331060

Change-Id: Idef226312b728fb041d9f58e664d8a9a2cad7f9f

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-06-16 01:44:23 +00:00
1565b969ce
Merge "Test extra info sent to NetworkMonitor" am: cd192301a2 am: 8825abb697
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331060

Change-Id: Ice048df853589411ee1f1c935b929994af1c525b

Chiachang Wang   authored and   Automerger Merge Worker   commited 2020-06-16 01:02:52 +00:00
bd4096a4b6
Add unit test for NetworkStatsSubscriptionsMonitor
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
(copy from ag/11788484 but getActiveAndHiddenSubscriptionIdList() since it's renamed
in internal)
Change-Id: Ia162f36efe96d90b2f6f70190d9fa855bba34484
Merged-In: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91

Aaron Huang   commited 2020-06-15 07:05:19 +00:00
791dfcb0f5
Test extra info sent to NetworkMonitor
Test extra info sent to NetworkMonitor correctly if network
agent is created through new NetworkAgent constructor without
legacy network info taken as parameter.

Bug: 156173829
Test: atest FrameworkNetTests
Change-Id: I4f827664c528bea30cc957a0a617dd37693f4460

Chiachang Wang   commited 2020-06-12 18:13:00 +08:00
0f6aeff137
Merge "Add unit test for NetworkStatsSubscriptionsMonitor" into rvc-dev am: 4ca7d588b4 am: a0e48b1df5 am: 2acbd72f5e am: 5e48bf1a25
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788484

Change-Id: I8a039b0c164e51ed9054d229f52ece259b894b63

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-12 02:35:26 +00:00
2b4aa6a273
Merge "Add unit test for NetworkStatsSubscriptionsMonitor" into rvc-dev am: 4ca7d588b4 am: a0e48b1df5 am: 2acbd72f5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788484

Change-Id: I643f27dda377ee5d2fa885cac8b814445363a20d

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-12 02:31:29 +00:00
5e48bf1a25
Merge "Add unit test for NetworkStatsSubscriptionsMonitor" into rvc-dev am: 4ca7d588b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788484

Change-Id: Iac633487b359d751206e06b2352a2a9cb475811e

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-06-12 02:11:29 +00:00
7150252ba4
Add unit test for NetworkStatsSubscriptionsMonitor
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
Change-Id: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91

Aaron Huang   commited 2020-06-09 00:40:36 +08:00
f0ada3725f
Merge "Add RequiresFeature annotations for IKEv2 VPN profiles" into rvc-dev am: 2a0b964e76 am: 0bdb3d9c51 am: 9e34b7f288 am: cc8c22564b
Change-Id: I3f95200a5bdcec9b6e0f6b6e0dddfa218240cd48

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-05-29 18:23:15 +00:00
0c28670222
Merge "Add RequiresFeature annotations for IKEv2 VPN profiles" into rvc-dev am: 2a0b964e76 am: 0bdb3d9c51
Change-Id: Id03dc7e3e2912f308b4ed42f2cc8cae80d9cd95d

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-05-29 17:45:55 +00:00
9e34b7f288
Merge "Add RequiresFeature annotations for IKEv2 VPN profiles" into rvc-dev am: 2a0b964e76
Change-Id: Ibc0f236234cd87d50a393c3dfaca7898b04e7432

Benedict Wong   authored and   Automerger Merge Worker   commited 2020-05-29 17:32:42 +00:00
7b05b0f5e6
Add RequiresFeature annotations for IKEv2 VPN profiles
This change adds the @RequiresFeature annotation to Ikev2VpnProfile
Builder methods, and checks before provisioning VPN profiles.

Bug: 156681625
Test: New tests added, passing.
Change-Id: I125d8fbe5d67fb877ad7d0636c007cb3e1a9f59b
Merged-In: I125d8fbe5d67fb877ad7d0636c007cb3e1a9f59b
(cherry picked from commit e84a17dd1706f4c8373047b2023a1ec4b7cf4bf3)

Benedict Wong   commited 2020-05-28 19:07:29 -07:00
7c40fcb2a4
Merge "Add RequiresFeature annotations for IKEv2 VPN profiles"
Benedict Wong   authored and   Gerrit Code Review   commited 2020-05-29 01:55:08 +00:00
618912a51c