Commit Graph

2352 Commits

Author SHA1 Message Date
Automerger Merge Worker
fce6aad2be Move sensitive field parceling bool to constructor
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).

Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Merged-In: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
(cherry picked from commit bf091021d332804e875d7fd3424340e32b896cce)

Change-Id: I98449430ca5b11f5a62ba43683663bd82650e817
2020-03-18 09:00:34 +00:00
Lorenzo Colitti
22974a9851 Merge "mtu: Add MTU parameter to Routes" am: 9839a4311a am: 1f7c5afe8d
Change-Id: I2164808ef628eb7c12e875f0bde7f5151bf6a5b5
2020-03-18 07:52:25 +00:00
Lorenzo Colitti
9839a4311a Merge "mtu: Add MTU parameter to Routes" 2020-03-18 07:20:01 +00:00
Chiachang Wang
b05dcda675 Add NattKeepalivePacketDataTest
Add test for constructor and parcel

Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
      on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
Merged-In: I97015365604be1846e3ecbaf60ac99e334705565
2020-03-18 05:44:26 +00:00
Cody Kesting
5596ba1619 Merge "Update ConnectivityDiagnosticsCallback function name." 2020-03-17 19:00:39 +00:00
Cody Kesting
fa1ef5eb1b Update ConnectivityDiagnosticsCallback function name.
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.

Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Merged-In: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
2020-03-17 17:10:38 +00:00
Automerger Merge Worker
7881eb41c5 Merge "Shorten the output of NetworkAgentInfo#toString()." am: d498a01647 am: d268beb59d
Change-Id: I4fb9efa69133ce8f960a37cfbb73264a4bfbf97a
2020-03-17 15:54:48 +00:00
Automerger Merge Worker
61886cc166 Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev am: ed28f2db59
Change-Id: I42c78c2626d1592bd5a0da215579f55bf04dc088
2020-03-17 15:48:00 +00:00
Treehugger Robot
d498a01647 Merge "Shorten the output of NetworkAgentInfo#toString()." 2020-03-17 15:29:39 +00:00
Lorenzo Colitti
08707366d0 Shorten the output of NetworkAgentInfo#toString().
Currently, printing a NetworkAgentInfo results in a very long
string. Make it a bit shorter by:

- Not printing a number of fields in NetworkInfo that are no
  longer used.
- Instead of printing flags regardless of whether they are true
  false, only print ones that are true. For example, this changes
    everCaptivePortalDetected{true} lastCaptivePortalDetected{false} captivePortalValidationPending{false}
  to:
    everCaptivePortalDetected
- Only printing clat information if clatd is started.

Also, put the long and variable-length fields lp and nc at the
end of the output.

Test: manual
Change-Id: I3312286be307ef1762890cbc6b717f12ce5b2b92
2020-03-17 22:29:37 +09:00
Treehugger Robot
b0863e0f5b Merge "Removing some of the API don't have to be @SystemApi" 2020-03-17 12:51:25 +00:00
Automerger Merge Worker
64b87e0b7c Merge changes I97015365,Ic9db4b9b am: 4d08f370af am: d714cd3f6d
Change-Id: I058fcb4d7dac3ef384c3ccbe5a2cc880c6aed2a3
2020-03-17 10:16:15 +00:00
Chiachang Wang
4d08f370af Merge changes I97015365,Ic9db4b9b
* changes:
  Add NattKeepalivePacketDataTest
  Add KeepalivePacketDataTest
2020-03-17 09:38:41 +00:00
Treehugger Robot
d7a6ba0cbb Merge "services.net: Add a static library needed by wifi module" 2020-03-17 09:22:12 +00:00
Automerger Merge Worker
2172759ccc Merge "Move sensitive field parceling bool to constructor" am: abc08c2456 am: 594f036a0e
Change-Id: Ice332671a4b97dad595c79c8c42ce47dca52b8e2
2020-03-17 08:17:51 +00:00
Chiachang Wang
5b710612a2 Add NattKeepalivePacketDataTest
Add test for constructor and parcel

Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
      on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
2020-03-17 15:48:02 +08:00
Automerger Merge Worker
8e9e1a0374 Add support for registering test networks with administrators.
CTS testing for ConnectivityDiagnosticsManager requires registering
TestNetworks with the administrator UIDs set. This sets up the CTS
process to be an administrator over the test network, which allows it to
receive ConnectivityDiagnosticsCallback callbacks.

Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Test: atest IpSecManagerTunnelTest
Change-Id: I7a443c368cf1ac470fbe40883ca24bc3143153b0
Merged-In: I7a443c368cf1ac470fbe40883ca24bc3143153b0
(cherry picked from commit 7b105b6194679fad6afe3615f0654b547034be6c)
2020-03-17 00:22:09 -07:00
Cody Kesting
22d0bfd7c4 Update ConnectivityDiagnosticsCallback function name.
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.

Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
(cherry picked from commit 324b224cc48fcb12125bd1727be70ad2effbfce3)
2020-03-17 00:16:58 -07:00
Remi NGUYEN VAN
8dd694d1d3 Move sensitive field parceling bool to constructor
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).

Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
2020-03-17 11:42:33 +09:00
Automerger Merge Worker
013e39e33e Merge "Add support for registering test networks with administrators." am: 5ec743bd25 am: 78f4f08bbf
Change-Id: Ib10e5f0e1b564a4dd8e5ae0bd4032741dcd4e2bb
2020-03-16 18:32:43 +00:00
Cody Kesting
5ec743bd25 Merge "Add support for registering test networks with administrators." 2020-03-16 18:02:55 +00:00
Cody Kesting
e80b81a7a4 Merge "Update Javadoc comments for ConnectivityDiagnostics constants." into rvc-dev 2020-03-16 15:39:43 +00:00
Aaron Huang
b782017f20 Removing some of the API don't have to be @SystemApi
Some of the API we made @SystemApi won't be used by mainline
module. Removing these from the surface.

Bug: 151266974
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      atest FrameworksWifiTests

Change-Id: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
Merged-In: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
2020-03-16 17:39:41 +08:00
Automerger Merge Worker
dceed35751 Merge "Removing some of the API don't have to be @SystemApi" into rvc-dev am: dda89138cd
Change-Id: I72f00d09e74eb0de1d837a29a2b869a4de45178d
2020-03-16 05:53:15 +00:00
Paul Hu
132b843b78 Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" into rvc-dev 2020-03-16 05:48:33 +00:00
Aaron Huang
dda89138cd Merge "Removing some of the API don't have to be @SystemApi" into rvc-dev 2020-03-16 05:47:34 +00:00
Roshan Pius
fae5822946 services.net: Add a static library needed by wifi module
Add a new static library that compiles against system_current which
includes all the parts needed by the wifi mainline module.

Also,
a) Refactored TcpKeepalivePacketData to use public APIs. The parcel
read/write methods in the base class are @hide and they're not used by
the other child class (NatKeepalivePacketData). So, remove the @hide
method from base class and use it direcly in the child class.

Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
Merged-In: Ifde69b579cfe5b813766f676acb10e436e64a44c
2020-03-16 00:23:42 +00:00
Mark Chien
962ea56bd0 Merge "Add javadoc for Network#netId" into rvc-dev 2020-03-15 02:53:29 +00:00
Automerger Merge Worker
194aa7937d Merge changes from topic "services.net-wifi" into rvc-dev am: 468ca0fc4f
Change-Id: I16a2b101e0d613fcd0d194b42ffb599865632ba9
2020-03-13 22:54:14 +00:00
Automerger Merge Worker
025f73910a Update Javadoc comments for ConnectivityDiagnostics constants.
API Council feedback requested adding documentation for detection method
constants used in DataStallReport to indicate how the Data Stall was
detected.

Bug: 150598997
Test: n/a
Change-Id: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
Merged-In: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
(cherry picked from commit 52d9e61121883945931de533b5cfd44da30c0248)
2020-03-13 21:00:31 +00:00
Automerger Merge Worker
d38a9eb01f Merge "Update Javadoc comments for ConnectivityDiagnostics constants." am: 0b6dd36a52 am: 438f8bbe71
Change-Id: I915de84881b04695b63769b270e6bddaeeceb1da
2020-03-13 19:49:45 +00:00
Cody Kesting
0b6dd36a52 Merge "Update Javadoc comments for ConnectivityDiagnostics constants." 2020-03-13 19:09:18 +00:00
Roshan Pius
1378facba4 services.net: Add a static library needed by wifi module
Add a new static library that compiles against system_current which
includes all the parts needed by the wifi mainline module.

Also,
a) Refactored TcpKeepalivePacketData to use public APIs. The parcel
read/write methods in the base class are @hide and they're not used by
the other child class (NatKeepalivePacketData). So, remove the @hide
method from base class and use it direcly in the child class.
b) Add jar-jar rules for all the statically linked dependencies in wifi
service jar rules.

Exempt-From-Owner-Approval: Minor change on top of owner's approval.
Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
2020-03-13 14:42:09 +00:00
Aaron Huang
d884e63e61 Removing some of the API don't have to be @SystemApi
Some of the API we made @SystemApi won't be used by mainline
module. Removing these from the surface.

Bug: 151266974
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      atest FrameworksWifiTests

Change-Id: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
2020-03-13 15:08:05 +08:00
Automerger Merge Worker
7b4eada7c2 Add javadoc for Network#netId
Bug: 151156820
Test: m doc-comment-check-docs

Change-Id: I18e6022c7b0b8bf132069f33d916d1b16d53d4f0
Merged-In: Iea34a5c58a8b77c83258a39a8a44601e21a482f5
(cherry picked from commit ab23c0fef8c02a9d63b1b48628eb687f589aac72)
2020-03-13 02:31:30 +00:00
Automerger Merge Worker
48a51904d2 Merge "Add javadoc for Network#netId" am: 08679046fe am: 7c87e61500
Change-Id: Ifcd5050d5d3499fece7fb359a6a4753333005e68
2020-03-12 10:30:05 +00:00
Mark Chien
08679046fe Merge "Add javadoc for Network#netId" 2020-03-12 09:55:18 +00:00
markchien
43321d2e00 Add javadoc for Network#netId
Bug: 151156820
Test: m doc-comment-check-docs
Change-Id: Iea34a5c58a8b77c83258a39a8a44601e21a482f5
2020-03-12 09:54:44 +00:00
paulhu
27ca44913a Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL
CONNECTIVITY_ACTION_SUPL is marked as a "temporary hack" and has
never been public. Remove this intent definition since no one is
receiving this intent and should use network callback to know the
connection change.

Bug: 109636544
Test: atest FrameworksNetTests
Change-Id: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
2020-03-11 22:14:11 +08:00
Cody Kesting
a84aee7ad3 Add support for registering test networks with administrators.
CTS testing for ConnectivityDiagnosticsManager requires registering
TestNetworks with the administrator UIDs set. This sets up the CTS
process to be an administrator over the test network, which allows it to
receive ConnectivityDiagnosticsCallback callbacks.

Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Test: atest IpSecManagerTunnelTest
Change-Id: I7a443c368cf1ac470fbe40883ca24bc3143153b0
2020-03-10 23:27:01 -07:00
Tyler Wear
e4314861e3 mtu: Add MTU parameter to Routes
- Change route to update existing route
- MTU parameter added to AddRoute

Bug: 142892223
Test: unit test
Change-Id: Ie339d0cee5be12c2232a4631fed61219a0facc64
2020-03-11 13:33:10 +08:00
Automerger Merge Worker
6617c9be42 Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider
Registering/Unregistering network provider needs NETWORK_FACTORY
which is signature only permission. But mainline modules can't
grant this permission because it's not signed with platform key.
Hence, these APIs should also accept MAINLINE_NETWORK_STACK
permission that allow mainline module to register/unregister
network provider.

Bug: 150733435
Test: atest FrameworksNetTests
Change-Id: Id22113aa0db01244817b4b008f5573c5e7b317f0
Merged-In: Id22113aa0db01244817b4b008f5573c5e7b317f0
(cherry picked from aosp/1248727)
2020-03-10 09:38:50 +00:00
Aaron Huang
0e1759bdfa Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia5692aade490fbc8a037186fcdfc453e0dd8045b
Merged-In: Ibf2f370c97a602f186e37ea9ffbe177dd2ee0f1c
2020-03-10 06:45:16 +00:00
Automerger Merge Worker
de03bda1c3 Remove polling of TetheringManager in ConnectivityManager.
Test: manual

Bug: 144742179
Merged-In: I7d88b38eb3d741534e980b7d1e226a411b71fae2
(cherry picked from commit f8a55a19faa938b4e58310f9a90926276b7936ea)

Change-Id: I5cc4231bfb9a0709d677acbb317ee98af31bd041
2020-03-09 06:29:22 +00:00
Automerger Merge Worker
76eead56aa Remove the NetworkScore class.
This class is useless at this point and introduces overhead.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib5f540070222865260c16c7182cc13c710a243c2
Merged-In: Ib5f540070222865260c16c7182cc13c710a243c2
(cherry picked from commit c3489ad3a6ce98218ce223cea877586781025b98)
2020-03-09 03:46:34 +00:00
Automerger Merge Worker
8f44cbe098 Merge "Remove the NetworkScore class." am: d88d10a100 am: 1f3fab6597
Change-Id: I5a14c3488b1f7011d49134819f659e3864b85f16
2020-03-08 05:26:15 +00:00
Automerger Merge Worker
1f3fab6597 Merge "Remove the NetworkScore class." am: d88d10a100
Change-Id: Ieb78467dac3aca48eea9d049b83a74f9ff41eec7
2020-03-08 05:11:03 +00:00
Treehugger Robot
d88d10a100 Merge "Remove the NetworkScore class." 2020-03-08 04:52:26 +00:00
Cody Kesting
83bc447911 Update Javadoc comments for ConnectivityDiagnostics constants.
API Council feedback requested adding documentation for detection method
constants used in DataStallReport to indicate how the Data Stall was
detected.

Bug: 150598997
Test: n/a
Change-Id: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
2020-03-06 08:05:06 -08:00
Aaron Huang
319b248b90 Merge "Remove framework code that has moved to frameworks/libs/net" into stage-aosp-master 2020-03-06 05:53:20 +00:00