Commit Graph

2376 Commits

Author SHA1 Message Date
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
Chalard Jean
8cdee3a431 Remove the NetworkScore class.
This class is useless at this point and introduces overhead.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib6da6c1c7f2a0b97c847d2e64e5ce16dd821e1e7
2020-03-06 11:57:53 +09:00
Automerger Merge Worker
156c5b1e46 Merge "Remove polling of TetheringManager in ConnectivityManager." am: d43d33333c am: c1314bb84f
Change-Id: I7d88b38eb3d741534e980b7d1e226a411b71fae2
2020-03-06 00:38:43 +00:00
Amos Bianchi
d43d33333c Merge "Remove polling of TetheringManager in ConnectivityManager." 2020-03-05 18:34:59 +00:00
Amos Bianchi
a9b415a49d Remove polling of TetheringManager in ConnectivityManager.
Test: manual

Bug: 144742179

Change-Id: I196b320788be96c120f771d2fcdf032a73e26b5f
2020-03-05 18:34:14 +00:00
Aaron Huang
adfebb8b5c 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: I44e0a8361637c2d43be2e5d033d405b22e1a149c
Merged-In: I067cdc404e5a63947c19cb75069a39ae42faa3c8
Merged-In: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
2020-03-05 13:53:39 +08:00
Automerger Merge Worker
6c718d0481 Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" am: 9f1fa12186 am: 3c77725b74
Change-Id: Ifb0b5b9742a9a4c0c4c1845c647184d65cff8e4f
2020-03-04 10:50:48 +00:00
Automerger Merge Worker
3c77725b74 Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" am: 9f1fa12186
Change-Id: I1ab6d47c17992f8630d9aba892bcef29dcb66bfa
2020-03-04 10:32:09 +00:00
Paul Hu
9f1fa12186 Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" 2020-03-04 10:15:41 +00:00
paulhu
b6ba8e84f4 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
2020-03-04 09:43:41 +08:00
Automerger Merge Worker
f500dafbdb Merge "Update NetworkInfo public API." am: a159122013
Change-Id: I6658d79bd9bda22ed6b8acac90ba94c9ef18c488
2020-03-03 09:40:07 +00:00
Aaron Huang
a159122013 Merge "Update NetworkInfo public API." 2020-03-03 09:16:55 +00:00
Automerger Merge Worker
6bef08258f New NetworkAgentConfig API to replace NetworkInfo WiFi stuff. am: cd457ea5ec
Change-Id: I94e3b25aa202e75338115f82c6db0dd0e41deb48
2020-03-03 03:53:58 +00:00
Automerger Merge Worker
7c9677256c Merge "Move NetworkAgent#register to a new method." am: 5d61bc285d
Change-Id: I4ca48f4232ad4733da5ce7f265fc911f5ff1a713
2020-03-03 03:52:17 +00:00
Aaron Huang
ea4d07c802 Merge changes from topic "del-factory-and-networkagent-wifi"
* changes:
  Delete NetworkFactory from frameworks/base/core.
  New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
2020-03-03 03:47:31 +00:00
Aaron Huang
5d61bc285d Merge "Move NetworkAgent#register to a new method." 2020-03-03 03:37:07 +00:00
Aaron Huang
fcca217a94 Merge "Remove framework code that has moved to frameworks/libs/net" 2020-03-02 06:23:44 +00:00
Automerger Merge Worker
9b08eb340a Merge "Always set NetworkInfo objects to available." am: e8a5275bc9
Change-Id: I89b53d1a254ca43566286b1309ce88b8a1518c4a
2020-03-02 05:10:35 +00:00
Aaron Huang
e8a5275bc9 Merge "Always set NetworkInfo objects to available." 2020-03-02 04:53:10 +00:00
Chalard Jean
fdb872c4ed Revert "Add public fields to NetworkScore and make it @SystemApi"
This reverts commit 511f7e3792.

Bug: 113554781
Test: FrameworksNetTests FrameworksTelephonyTests FrameworksWifiTests
Change-Id: Ie1e84bd2a16f088307b195f924f4e49335cbe367
2020-02-28 06:26:27 +00:00
Automerger Merge Worker
f0de11d057 Merge "Add methods to send connected/disconnected state." am: 40dba07dc3
Change-Id: If69bd650e129dc9f058e47832d48651b9243a3bb
2020-02-27 03:23:48 +00:00
Chalard Jean
4d5537853a 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
2020-02-24 21:07:08 +08:00
Chalard Jean
4c2f233f6b Merge changes Ia91b3b3c,Id9ecdac5,I4b17d1b1
* changes:
  Revert "[NS D01] Remove candidates that don't satisfy the request."
  Revert "[NS D02] Mix in the ignore on wifi policy."
  Revert "Address comments on ag/10316753"
2020-02-21 11:06:55 +00:00
Chalard Jean
1d9a206bca Revert "[NS D02] Mix in the ignore on wifi policy."
This reverts commit 7a56387e2c.

Reason for revert: The feature was punted out of R.

Change-Id: Id9ecdac5292eeddf7c12f2330421248b0f8355a9
2020-02-21 09:28:18 +00:00
TreeHugger Robot
7bcd12e7d2 Merge changes from topic "revert-10338939-YCRBMILGZV"
* changes:
  Revert "[NS D03] Migrate the bad wifi avoidance policy"
  Revert "[NS D04] Implement a simple speed comparison between scores."
2020-02-21 08:51:09 +00:00
Chalard Jean
cd457ea5ec New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
Bug: 139268426
Test: FrameworkWifiTests
Change-Id: Id13fcf41e05fd1eb26c86717e2684c724b94e401
Merged-In: Id13fcf41e05fd1eb26c86717e2684c724b94e401
2020-02-21 16:08:17 +08:00
Chalard Jean
5863a71547 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)
2020-02-21 14:54:18 +08:00