Commit Graph

1859 Commits

Author SHA1 Message Date
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
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
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
Lorenzo Colitti
b32fb84a4b Make LinkPropertiesTest pass, and fix an NPE.
aosp/973686 added the DHCP server address to LinkProperties, but
it did not have any tests, and would throw NPE when parceling a
LinkProperties that did not have a DHCP server.

Add tests and fix the bug.

Bug: 134098566
Test: unit test now passes
Change-Id: If28f0be650963e8d9af7eb53f6940824582a2db3
2020-01-07 13:02:32 +09:00
Artur Satayev
b9ea02fe06 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
2020-01-06 16:47:35 +00:00
ruibin zhang
56d4a8aed7 Add the DHCP server address to LinkProperties.
Bug: 134098566
Test: see subsequent CL in topic
Change-Id: If0f80067934189137c87cd379e7ae47b187562fd
2020-01-07 01:21:07 +09:00
TreeHugger Robot
cf385e4746 Merge "Add NETWORK_AIRPLANE_MODE permission" 2020-01-06 14:15:46 +00:00
Cody Kesting
8ddcb9fe40 Add API surface for ConnectivityDiagnostics API.
ConnectivityDiagnostics API will be used to provide callbacks to
permissioned applications for notifications on network connectivity
events.

Bug: 143187964
Test: compiles
Change-Id: Ib3c0b93f534a9c540e577891aa8aa0a2ad6de71f
2020-01-02 10:51:17 -08:00
Automerger Merge Worker
4516709248 Merge "Expose NetworkCapabilities methods to system/public APIs" am: 2b6f4c6dbb am: 990c9b6c8d am: 231a4ab4fe
Change-Id: I6515df858f4ebc94d234f905a659db45188d72c6
2019-12-27 08:54:24 +00:00
Aaron Huang
9572fe28f5 Expose NetworkCapabilities methods to system/public APIs
Add methods to system/public APIs for mainline support.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: atest FrameworksNetTests
      atest NetworkStackTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
      atest FrameworksTelephonyTests
      atest android.net.cts
      atest android.net.wifi.cts
      atest android.telephony.cts

Change-Id: I6ec333309172edaf5aa976f83cfbe63512043594
2019-12-27 08:31:06 +00:00
markchien
b0bb7865e0 [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
markchien
4f94981670 [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
Automerger Merge Worker
ac96fa4df6 Merge "Add LinkProperties methods to system APIs" am: b64d2c9501 am: 80bcbcdeec am: 96c042b148
Change-Id: I39e9224206a43a85fecaf0956003cd4896ca0820
2019-12-19 08:38:26 +00:00
Aaron Huang
b64d2c9501 Merge "Add LinkProperties methods to system APIs" 2019-12-19 08:01:58 +00:00
Automerger Merge Worker
8cec43be41 Merge "Fix parceling of LinkProperties Inet6Addr" am: 87c9d38d1e am: c7e09e3c83 am: 0b0d019da8
Change-Id: I6692a91c3e00fb8726ed4914f7d7e3c22874a068
2019-12-19 03:46:11 +00:00
Remi NGUYEN VAN
87c9d38d1e Merge "Fix parceling of LinkProperties Inet6Addr" 2019-12-19 03:07:43 +00:00
Remi NGUYEN VAN
e50cd96c1d Fix parceling of LinkProperties Inet6Addr
IPv6 addresses parceled for DNS servers, private DNS servers, PCSCF
servers were parceled without the scope. This causes issues with
link-local DNS servers.

Test: atest FrameworksNetTests
Bug: 145181158
Change-Id: I0ed24e51d4d0656f4a1f932b5e9f646b35b4b971
2019-12-18 19:52:30 +09:00
Aaron Huang
91caaeedb7 Add keepalive related methods and fields to system APIs
Add KeepalivePacketData to system API for mainline support.
Also, remove InvalidPacketException class from SocketKeepalive
and create a new InvalidPacketException class in android.net

Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: atest FrameworksNetTests
      atest NetworkStackTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
      atest android.net.cts
      atest android.net.wifi.cts
      atest android.telephony.cts

Change-Id: I2d982e8abb5cb6b4c74a20483550b18cf814320d
Merged-In: I2d982e8abb5cb6b4c74a20483550b18cf814320d
2019-12-17 16:21:19 +00:00