Commit Graph

1874 Commits

Author SHA1 Message Date
Lorenzo Colitti
b668629e20 Merge "Make most of NetworkAgent @SystemApi." 2020-01-15 09:56:31 +00:00
Lorenzo Colitti
10a12966c2 Make most of NetworkAgent @SystemApi.
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: I856f01f02c35c2f6a886d8b98039e5dfbc48148b
2020-01-15 16:05:26 +09:00
Mark Chien
d402e3d1f4 Merge "Unhide NetworkRequest API which use legacy type" 2020-01-15 04:29:15 +00:00
Remi NGUYEN VAN
9c5c26aa45 Merge "Add NetworkRequest#satisfiedBy to SystemApi" 2020-01-15 04:14:32 +00:00
TreeHugger Robot
26246e41de Merge "Remove framework code that has moved to frameworks/libs/net" 2020-01-15 02:47:52 +00:00
Paul Hu
008e319fe4 Merge "Expose SocketKeepalive#SUCCESS as SystemApi" 2020-01-15 02:44:32 +00:00
Automerger Merge Worker
2011b0b67f Merge "Make NattKeepalivePacketData @SystemApi" am: d21ba54347 am: 1f5333e4e7 am: 4f463b6b2f
Change-Id: Idd26f3118e879ab05a8cdd23a9e4999b3bafbf47
2020-01-14 15:32:07 +00:00
Aaron Huang
d21ba54347 Merge "Make NattKeepalivePacketData @SystemApi" 2020-01-14 14:36:09 +00:00
paulhu
15602153ee Expose SocketKeepalive#SUCCESS as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests
Change-Id: I94171b2dc4f26442df918547bf8bc40953f63f2e
2020-01-14 21:42:56 +08:00
Remi NGUYEN VAN
ecd878b94f Add NetworkRequest#satisfiedBy to SystemApi
The API is useful for NetworkFactories to select requests based on
capabilities.
This mirrors NetworkCapabilities#satisfiedByNetworkCapabilities

Test: m
Bug: 138306002
Change-Id: I1d4a928256951397cabde5c352a872fd48d85859
2020-01-14 21:45:38 +09:00
Aaron Huang
e654f5000d 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
      atest ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
2020-01-14 18:10:39 +09:00
Chalard Jean
cbb58f167b Merge "Have registerNetworkAgent return a Network." 2020-01-14 07:06:37 +00:00
Automerger Merge Worker
3b775e8a78 Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi" am: 0699745a3d am: 837d7c87a9 am: cc47efa6f0
Change-Id: I5706151c291cbdbc3a1f73ebb3669f56a61509ba
2020-01-14 06:27:10 +00:00
Lorenzo Colitti
0699745a3d Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi" 2020-01-14 05:30:14 +00:00
Lorenzo Colitti
8229e6fee6 Merge "Add a Builder to NetworkAgentConfig, and make it SystemApi." 2020-01-14 05:01:06 +00:00
Chalard Jean
1aea87a9c1 Have registerNetworkAgent return a Network.
This is more useful.

Bug: 135998869
Test: FrameworkNetTests FrameworksWifiTests
Change-Id: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
2020-01-14 13:59:55 +09:00
markchien
769c575b67 Unhide NetworkRequest API which use legacy type
Bug: 144753389
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I349da06769e9ffcee6bb42f51ab454e0ef774fb3
2020-01-14 12:54:40 +08:00
Lorenzo Colitti
810e98607b Add a Builder to NetworkAgentConfig, and make it SystemApi.
Currently, only support the three elements in the config that are
known to be used.

Bug: 138306002
Test: builds, boots
Test: atest FrameworksTelephonyTests
Change-Id: I1d231ec2ddcff97c039bcbc815a39c1d3e26c410
2020-01-14 11:43:53 +09:00
Automerger Merge Worker
dc174e63f3 Merge "Support reevaluation request from captive portal app" am: 2d9623d86f am: 8f50df2e87 am: 53aa51e02f
Change-Id: Id0c020ade4c7de71f7540a82d84045e131ea25e2
2020-01-14 02:33:53 +00:00
paulhu
62af612113 Expose ConnectivityManager#TYPE_NONE as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests
Change-Id: Ia496aaeaf74fa44764640fd2b97c417509e040aa
2020-01-14 10:02:30 +08:00
Chiachang Wang
2d9623d86f Merge "Support reevaluation request from captive portal app" 2020-01-14 01:42:22 +00:00
Aaron Huang
5dcbfa87e1 Make NattKeepalivePacketData @SystemApi
Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests

Change-Id: I687f1a8a4b82cb7e4a0dfeb24f0b23a4de6d5287
2020-01-14 01:45:28 +08:00
Chiachang Wang
ef4a17d140 Support reevaluation request from captive portal app
CaptivePortalLogin use similar way to validate the network as
NetworkMonitor. Provide API to reuse NetworkMonitor facilities
for consistent captive portal detection.

Bug: 134892996
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Test: manually test with captive portal Wi-Fi
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Change-Id: I6f039eae7ceb18eb6c3cf15587cdc27a7fe35b00
2020-01-13 14:28:02 +08:00
Lorenzo Colitti
2e966fe619 Rename NetworkMisc to NetworkAgentConfig.
NetworkMisc is not really an appropriate name for a system API.

Bug: 138306002
Test: builds, boots, wifi works, telephony works
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I621cfbe165996c67b201ca2dd2f95a5ab9af10ee
2020-01-13 15:01:52 +09:00
Lorenzo Colitti
df43b6f77a Make NetworkAgent stop subclassing Handler.
Subclassing Handler is not appropriate for a system API because
it is an implementation detail and allows users of this class to
post messages to the handler in ways that allow inappropriate
access to internals that aren't part of the API contract.

Also fix some lint errors.

Test: builds
Bug: 138306002
Change-Id: I79478ceff6bbcae879d1025098d177de0d15dbee
2020-01-13 14:49:15 +09:00
Automerger Merge Worker
8887e6d98c Merge changes I7ea39b80,I6b9979f3 am: 310d1dac0d am: b65004fb39 am: 86daa3d123
Change-Id: I97bd2471b04d9a6291b03a989ccd618c2dc70c6e
2020-01-13 04:51:33 +00:00
Lorenzo Colitti
94c9314065 Stop using NetworkFactory in connectivity code.
Bug: 138306002
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: I6b9979f343108c0c077abd86ae1c21e5ece0cccc
2020-01-12 17:40:02 +09:00
Automerger Merge Worker
4e75cd9d7a Merge "Add NetworkCapabilities#deduceRestrictedCapability" am: 39ac72436e am: 21da34591b am: 8668775892
Change-Id: I9d593d245287362aad82d70ac5fed4d6339f82d7
2020-01-10 09:55:33 +00:00
Treehugger Robot
39ac72436e Merge "Add NetworkCapabilities#deduceRestrictedCapability" 2020-01-10 09:27:31 +00:00
Automerger Merge Worker
88c136c666 Merge "Expose DhcpInfo parcelable interface implementation methods" am: 6510da5883 am: 1debddec2f am: ead3701de3
Change-Id: I202ba0c2fe026186c59bb0d7b58d8bb8b5be98c2
2020-01-10 08:42:17 +00:00
Aaron Huang
6510da5883 Merge "Expose DhcpInfo parcelable interface implementation methods" 2020-01-10 08:05:24 +00:00
Aaron Huang
a4885a0b8e Merge "Add keepalive related methods and fields to system APIs" 2020-01-10 06:16:04 +00:00
Automerger Merge Worker
53e0cd9d7f Merge "Add a NetworkProvider class to the SDK." am: e026356956 am: f36cb1cf82 am: e0ea3bdd96
Change-Id: I7161415a495f9d31762545b5efeb81b387a475cd
2020-01-09 15:33:58 +00:00
Lorenzo Colitti
e026356956 Merge "Add a NetworkProvider class to the SDK." 2020-01-09 15:09:58 +00:00
Aaron Huang
a397c7e03a Expose DhcpInfo parcelable interface implementation methods
Parcelable class requires a CREATOR field be exposed.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      atest android.net.cts

Change-Id: I41c68406d09014dda99f337add8c0db0298b0582
2020-01-09 21:33:22 +08:00
Lorenzo Colitti
92e6c27592 Add a NetworkProvider class to the SDK.
Bug: 138306002
Test: builds, boots, wifi and telephony work
Test: tested by upcoming change that uses this in NetworkFactory
Change-Id: I2f61bf323215b7c6feff8acc92e7434346751773
2020-01-09 19:50:26 +09:00
paulhu
a189a352b8 Add NetworkCapabilities#deduceRestrictedCapability
Support telephony mainline module usage.

Bug: 138306002
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant

Change-Id: Idbd9c547eff7227085c753461b901c7cdbe396fb
2020-01-09 17:59:46 +08:00
Automerger Merge Worker
edd89f4a7e Merge "Replace ConnectivityManager constants to TetheringManager" am: 477f778f0b am: e6029da66e am: 32b9e18ca5
Change-Id: I0180fe011062a11d7cc925bced8d8178fa3dcc63
2020-01-09 07:25:42 +00:00
Mark Chien
477f778f0b Merge "Replace ConnectivityManager constants to TetheringManager" 2020-01-09 06:32:04 +00:00
Chiachang Wang
a935ddf1f0 Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I6260695b01ec06244d2822f9438a7fae83539ff2
Merged-In: I0a462da4e87cae2c7d4a9b9a92de061a086c5752
2020-01-09 10:25:03 +08:00
Automerger Merge Worker
7308e207c8 Merge "Add API surface for ConnectivityDiagnostics API." am: 4fa27babe0 am: b37d6383db am: 89f20ee101
Change-Id: Id7191b7b625a4026feb7f752c7475011a3adbf52
2020-01-08 22:49:23 +00:00
Cody Kesting
4fa27babe0 Merge "Add API surface for ConnectivityDiagnostics API." 2020-01-08 21:53:14 +00:00
markchien
1f5237045a Replace ConnectivityManager constants to TetheringManager
Replace some ConnectivityManager constants as TetheringManager inside
tethering module. No API change, will have follow up CL to delete
@hide tethering constants in ConnectivityManager and replace caller
to using TetheringManager.

Bug: 144753389
Test: build
Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
2020-01-08 15:06:09 +00:00
Artur Satayev
0e45d789c1 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Chiachang Wang
b3d429fda1 Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I0a462da4e87cae2c7d4a9b9a92de061a086c5752
2020-01-08 11:08:10 +08:00
Automerger Merge Worker
3c01fca5a7 Merge "Change tetheroffloadjni to tetheringutilsjni" am: c21a9bcc0e am: ec2f2397ff am: 69df3dd6c8
Change-Id: I2069561edb05b53e565563c8419c689531ff9571
2020-01-07 09:38:44 +00:00
Treehugger Robot
c21a9bcc0e Merge "Change tetheroffloadjni to tetheringutilsjni" 2020-01-07 09:05:43 +00:00
TreeHugger Robot
74bd408649 Merge "Use new UnsupportedAppUsage annotation." 2020-01-07 07:58:18 +00:00
markchien
697fca5c4d Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -Off/On hotspot with ipv6 upstream

Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800
2020-01-07 07:42:13 +00:00
Automerger Merge Worker
bb5729e19d Merge changes If28f0be6,If0f80067 am: 96529ad7fc am: 6df702d3c9 am: b071735cd8
Change-Id: I826f1f94ea62eb5bd93e5d7edcbe278c8247ae2d
2020-01-07 07:31:36 +00:00