Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Merge "TetheringManager API clean up"
Mark Chien   authored and   Gerrit Code Review   commited 2020-03-19 16:09:21 +00:00
bc91f858e6
Merge "Move NetworkCallback to last parameter for new exposed requestNetwork"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-19 15:51:32 +00:00
f0da719ed1
Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
Merged-In: I87ef1d451eefa6998b9793c4eacabae978376d24

markchien   authored and   Mark Chien   commited 2020-03-19 11:36:07 +00:00
fac84a2be1
TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45

markchien   commited 2020-03-19 19:32:50 +08:00
f47d83448c
Merge "Make Ethernet interfaces more testable."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-19 11:12:09 +00:00
cabe5e5615
Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL"
Paul Hu   authored and   Gerrit Code Review   commited 2020-03-19 01:10:55 +00:00
57b993bfb5
Make Ethernet interfaces more testable.
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.

Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca

Lorenzo Colitti   commited 2020-03-19 09:46:37 +09:00
965434afab
Merge "mtu: Add MTU parameter to Routes"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-18 07:20:01 +00:00
9839a4311a
Merge "Update ConnectivityDiagnosticsCallback function name."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-17 19:00:39 +00:00
5596ba1619
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

Cody Kesting   commited 2020-03-17 17:10:38 +00:00
fa1ef5eb1b
Merge "Shorten the output of NetworkAgentInfo#toString()."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 15:29:39 +00:00
d498a01647
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

Lorenzo Colitti   commited 2020-03-17 22:29:37 +09:00
08707366d0
Merge "Removing some of the API don't have to be @SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 12:51:25 +00:00
b0863e0f5b
Merge changes I97015365,Ic9db4b9b
* changes:
  Add NattKeepalivePacketDataTest
  Add KeepalivePacketDataTest

Chiachang Wang   authored and   Gerrit Code Review   commited 2020-03-17 09:38:41 +00:00
4d08f370af
Merge "services.net: Add a static library needed by wifi module"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 09:22:12 +00:00
d7a6ba0cbb
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

Chiachang Wang   commited 2020-03-17 15:48:02 +08:00
5b710612a2
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

Remi NGUYEN VAN   commited 2020-03-17 11:42:33 +09:00
8dd694d1d3
Merge "Add support for registering test networks with administrators."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-16 18:02:55 +00:00
5ec743bd25
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

Aaron Huang   commited 2020-03-16 17:39:41 +08:00
b782017f20
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

Roshan Pius   commited 2020-03-16 00:23:42 +00:00
fae5822946
Merge "Update Javadoc comments for ConnectivityDiagnostics constants."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-13 19:09:18 +00:00
0b6dd36a52
Merge "Add javadoc for Network#netId"
Mark Chien   authored and   Gerrit Code Review   commited 2020-03-12 09:55:18 +00:00
08679046fe
Add javadoc for Network#netId
Bug: 151156820
Test: m doc-comment-check-docs
Change-Id: Iea34a5c58a8b77c83258a39a8a44601e21a482f5

markchien   authored and   Mark Chien   commited 2020-03-12 09:54:44 +00:00
43321d2e00
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

paulhu   commited 2020-03-11 22:14:11 +08:00
27ca44913a
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

Cody Kesting   commited 2020-03-10 23:27:01 -07:00
a84aee7ad3
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

Tyler Wear   authored and   Aaron Huang   commited 2020-03-11 13:33:10 +08:00
e4314861e3
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

Aaron Huang   commited 2020-03-10 06:45:16 +00:00
0e1759bdfa
Merge "Remove the NetworkScore class."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-08 04:52:26 +00:00
d88d10a100
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

Cody Kesting   commited 2020-03-06 08:05:06 -08:00
83bc447911
Remove the NetworkScore class.
This class is useless at this point and introduces overhead.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib6da6c1c7f2a0b97c847d2e64e5ce16dd821e1e7

Chalard Jean   commited 2020-03-06 11:57:53 +09:00
8cdee3a431
Merge "Remove polling of TetheringManager in ConnectivityManager."
Amos Bianchi   authored and   Gerrit Code Review   commited 2020-03-05 18:34:59 +00:00
d43d33333c
Remove polling of TetheringManager in ConnectivityManager.
Test: manual

Bug: 144742179

Change-Id: I196b320788be96c120f771d2fcdf032a73e26b5f

Amos Bianchi   commited 2020-03-05 18:34:14 +00:00
a9b415a49d
Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" am: 9f1fa12186
Change-Id: I1ab6d47c17992f8630d9aba892bcef29dcb66bfa

Automerger Merge Worker   commited 2020-03-04 10:32:09 +00:00
3c77725b74
Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider"
Paul Hu   authored and   Gerrit Code Review   commited 2020-03-04 10:15:41 +00:00
9f1fa12186
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

paulhu   commited 2020-03-04 09:43:41 +08:00
b6ba8e84f4
Merge "Update NetworkInfo public API." am: a159122013
Change-Id: I6658d79bd9bda22ed6b8acac90ba94c9ef18c488

Automerger Merge Worker   commited 2020-03-03 09:40:07 +00:00
f500dafbdb
Merge "Update NetworkInfo public API."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 09:16:55 +00:00
a159122013
New NetworkAgentConfig API to replace NetworkInfo WiFi stuff. am: cd457ea5ec
Change-Id: I94e3b25aa202e75338115f82c6db0dd0e41deb48

Automerger Merge Worker   commited 2020-03-03 03:53:58 +00:00
6bef08258f
Merge "Move NetworkAgent#register to a new method." am: 5d61bc285d
Change-Id: I4ca48f4232ad4733da5ce7f265fc911f5ff1a713

Automerger Merge Worker   commited 2020-03-03 03:52:17 +00:00
7c9677256c
Merge changes from topic "del-factory-and-networkagent-wifi"
* changes:
  Delete NetworkFactory from frameworks/base/core.
  New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.

Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 03:47:31 +00:00
ea4d07c802
Merge "Move NetworkAgent#register to a new method."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 03:37:07 +00:00
5d61bc285d
Merge "Remove framework code that has moved to frameworks/libs/net"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-02 06:23:44 +00:00
fcca217a94
Merge "Always set NetworkInfo objects to available." am: e8a5275bc9
Change-Id: I89b53d1a254ca43566286b1309ce88b8a1518c4a

Automerger Merge Worker   commited 2020-03-02 05:10:35 +00:00
9b08eb340a
Merge "Always set NetworkInfo objects to available."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-02 04:53:10 +00:00
e8a5275bc9
Merge "Add methods to send connected/disconnected state." am: 40dba07dc3
Change-Id: If69bd650e129dc9f058e47832d48651b9243a3bb

Automerger Merge Worker   commited 2020-02-27 03:23:48 +00:00
f0de11d057
Update NetworkInfo public API.
Wifi needs to create these objects so it can include them
in the broadcasts.

Bug: 135998869
Test: FrameworksWifiTests
Change-Id: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc
Merged-In: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc

Chalard Jean   authored and   Aaron Huang   commited 2020-02-24 21:07:08 +08:00
4d5537853a
New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
Bug: 139268426
Test: FrameworkWifiTests
Change-Id: Id13fcf41e05fd1eb26c86717e2684c724b94e401
Merged-In: Id13fcf41e05fd1eb26c86717e2684c724b94e401

Chalard Jean   authored and   Aaron Huang   commited 2020-02-21 16:08:17 +08:00
cd457ea5ec
Move NetworkAgent#register to a new method.
Calling IPC in a constructor is unusual and confusing, and can be
considered bad form. There are multiple reasons for this :
• Users can't obtain an instance of the class without calling the
  constructor, but they can't always afford an IPC where they need
  this, forcing them to know about the implementation detail and
  sometimes design around it.
• On a related but generalized note, constructors should usually
  be fast for the same range of reasons.
• Having a separate method to register the agent simply gives more
  flexibility to the app.
• It's also a lot easier to test.
But also we can't fix it without an update to the API, so here it is.

Another reason for doing this is consistency with the NetworkProvider
API.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I1ee5c7b1353d581e487c8a8a159009bebd781643
Merged-In: I1ee5c7b1353d581e487c8a8a159009bebd781643
(clean cherry-pick from internal branch)

Chalard Jean   authored and   Aaron Huang   commited 2020-02-21 14:54:18 +08:00
5863a71547
Add methods to send connected/disconnected state.
Also add methods to set the legacy subtype and the APN name.
These have to be added together because they have to be used
together.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: Ie90b8d290eab490061d5cb066744b67d597b9469
Merged-In: Ie90b8d290eab490061d5cb066744b67d597b9469
(clean cherry-pick from internal branch)

Chalard Jean   authored and   Aaron Huang   commited 2020-02-20 19:37:16 +08:00
3946b0ac1e
Merge "Sanitize owner UID iff owning app does not have location permissions." am: 4d95254cb3
Change-Id: Ie5876d063d7440aacc57d48cb4573798303910ea

Automerger Merge Worker   commited 2020-02-20 05:30:20 +00:00
aba23b3f43