Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Unhide NetworkRequest API which use legacy type
Bug: 144753389
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I349da06769e9ffcee6bb42f51ab454e0ef774fb3

markchien   commited 2020-01-14 12:54:40 +08:00
fd051db78b
Merge "Support reevaluation request from captive portal app" am: 254c3d830e am: 006e9bc1e7 am: 5980ff839e
Change-Id: Id0c020ade4c7de71f7540a82d84045e131ea25e2

Automerger Merge Worker   commited 2020-01-14 02:33:53 +00:00
5e6e597748
Merge "Support reevaluation request from captive portal app"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-01-14 01:42:22 +00:00
254c3d830e
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

Chiachang Wang   commited 2020-01-13 14:28:02 +08:00
938bfba0c3
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

Lorenzo Colitti   commited 2020-01-13 15:01:52 +09:00
8dd13a8109
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

Lorenzo Colitti   commited 2020-01-13 14:49:15 +09:00
c58ecd5f33
Merge changes I7ea39b80,I6b9979f3 am: 310d1dac0d am: 3efc93af3d am: 243e5f21ea
Change-Id: I97bd2471b04d9a6291b03a989ccd618c2dc70c6e

Automerger Merge Worker   commited 2020-01-13 04:51:33 +00:00
8ae3471952
Stop using NetworkFactory in connectivity code.
Bug: 138306002
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: I6b9979f343108c0c077abd86ae1c21e5ece0cccc

Lorenzo Colitti   commited 2020-01-12 17:40:02 +09:00
a86fae785a
Merge "Add NetworkCapabilities#deduceRestrictedCapability" am: 0e82d1c50d am: 2d976e6c9e am: 02ee974ee1
Change-Id: I9d593d245287362aad82d70ac5fed4d6339f82d7

Automerger Merge Worker   commited 2020-01-10 09:55:33 +00:00
934e051607
Merge "Add NetworkCapabilities#deduceRestrictedCapability"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-10 09:27:31 +00:00
0e82d1c50d
Merge "Expose DhcpInfo parcelable interface implementation methods" am: 617e9bd709 am: 6817693ef3 am: badb0c36b6
Change-Id: I202ba0c2fe026186c59bb0d7b58d8bb8b5be98c2

Automerger Merge Worker   commited 2020-01-10 08:42:17 +00:00
f82ab34c40
Merge "Expose DhcpInfo parcelable interface implementation methods"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-01-10 08:05:24 +00:00
617e9bd709
Merge "Add keepalive related methods and fields to system APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-01-10 06:16:04 +00:00
434bc5adf4
Merge "Add a NetworkProvider class to the SDK." am: 3bd0d010bb am: 4de6a72e85 am: b24adb4bb0
Change-Id: I7161415a495f9d31762545b5efeb81b387a475cd

Automerger Merge Worker   commited 2020-01-09 15:33:58 +00:00
5c058b526c
Merge "Add a NetworkProvider class to the SDK."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-01-09 15:09:58 +00:00
3bd0d010bb
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

Aaron Huang   commited 2020-01-09 21:33:22 +08:00
cf22d1a29f
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

Lorenzo Colitti   commited 2020-01-09 19:50:26 +09:00
6702d4b5b2
Add NetworkCapabilities#deduceRestrictedCapability
Support telephony mainline module usage.

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

Change-Id: Idbd9c547eff7227085c753461b901c7cdbe396fb

paulhu   commited 2020-01-09 17:59:46 +08:00
9c7a0fa46a
Merge "Replace ConnectivityManager constants to TetheringManager" am: 8124da436a am: ced6412599 am: 023c3b47b0
Change-Id: I0180fe011062a11d7cc925bced8d8178fa3dcc63

Automerger Merge Worker   commited 2020-01-09 07:25:42 +00:00
20c3474d81
Merge "Replace ConnectivityManager constants to TetheringManager"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-09 06:32:04 +00:00
8124da436a
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

Chiachang Wang   commited 2020-01-09 10:25:03 +08:00
c2441ee239
Merge "Add API surface for ConnectivityDiagnostics API." am: 33bb594563 am: 30f5bec382 am: b432ef87d2
Change-Id: Id7191b7b625a4026feb7f752c7475011a3adbf52

Automerger Merge Worker   commited 2020-01-08 22:49:23 +00:00
0f44319e8a
Merge "Add API surface for ConnectivityDiagnostics API."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-01-08 21:53:14 +00:00
33bb594563
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

markchien   authored and   Mark Chien   commited 2020-01-08 15:06:09 +00:00
a0f8fd92fd
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

Artur Satayev   commited 2020-01-08 14:04:40 +00:00
9c2add6fcc
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

Chiachang Wang   commited 2020-01-08 11:08:10 +08:00
7879adc8b1
Merge "Change tetheroffloadjni to tetheringutilsjni" am: 0af9d37eca am: d248c13bda am: e7294ecb17
Change-Id: I2069561edb05b53e565563c8419c689531ff9571

Automerger Merge Worker   commited 2020-01-07 09:38:44 +00:00
d35146155f
Merge "Change tetheroffloadjni to tetheringutilsjni"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-07 09:05:43 +00:00
0af9d37eca
Merge "Use new UnsupportedAppUsage annotation."
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-07 07:58:18 +00:00
bf954f0c42
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

markchien   authored and   Mark Chien   commited 2020-01-07 07:42:13 +00:00
d53edf736f
Merge changes If28f0be6,If0f80067 am: 96529ad7fc am: 21dd220d3e am: 2a55907ecf
Change-Id: I826f1f94ea62eb5bd93e5d7edcbe278c8247ae2d

Automerger Merge Worker   commited 2020-01-07 07:31:36 +00:00
46ea41c701
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

Lorenzo Colitti   commited 2020-01-07 13:02:32 +09:00
279a1d6620
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

Artur Satayev   commited 2020-01-06 16:47:35 +00:00
53dac33c7e
Add the DHCP server address to LinkProperties.
Bug: 134098566
Test: see subsequent CL in topic
Change-Id: If0f80067934189137c87cd379e7ae47b187562fd

ruibin zhang   authored and   Lorenzo Colitti   commited 2020-01-07 01:21:07 +09:00
ca75bc897d
Merge "Add NETWORK_AIRPLANE_MODE permission"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-06 14:15:46 +00:00
dc3b592193
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

Cody Kesting   commited 2020-01-02 10:51:17 -08:00
457a1ad289
Merge "Expose NetworkCapabilities methods to system/public APIs" am: 9290dc1179 am: 5d77a84faf am: bd94fca597
Change-Id: I6515df858f4ebc94d234f905a659db45188d72c6

Automerger Merge Worker   commited 2019-12-27 08:54:24 +00:00
467942cf30
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

Aaron Huang   commited 2019-12-27 08:31:06 +00:00
e435d2aeb1
[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

markchien   commited 2019-12-20 10:31:31 +08:00
be9b5e5eea
[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

markchien   commited 2019-12-19 20:53:06 +08:00
5776f96096
Merge "Add LinkProperties methods to system APIs" am: 5966c91e94 am: 2b7e2960e3 am: 71b47b486d
Change-Id: I39e9224206a43a85fecaf0956003cd4896ca0820

Automerger Merge Worker   commited 2019-12-19 08:38:26 +00:00
76d5022cf9
Merge "Add LinkProperties methods to system APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-12-19 08:01:58 +00:00
5966c91e94
Merge "Fix parceling of LinkProperties Inet6Addr" am: 98460b6863 am: d33931f634 am: f72923e980
Change-Id: I6692a91c3e00fb8726ed4914f7d7e3c22874a068

Automerger Merge Worker   commited 2019-12-19 03:46:11 +00:00
b3df292a9d
Merge "Fix parceling of LinkProperties Inet6Addr"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-12-19 03:07:43 +00:00
98460b6863
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

Remi NGUYEN VAN   commited 2019-12-18 19:52:30 +09:00
3a59a925e0
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

Aaron Huang   commited 2019-12-17 16:21:19 +00:00
441e499861
Merge "Add keepalive related methods and fields to system APIs"
Aaron Huang   authored and   Android (Google) Code Review   commited 2019-12-17 13:57:13 +00:00
aab5480b48
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

Aaron Huang   commited 2019-12-13 23:05:37 +08:00
5a916810c6
Merge "Make getNetworkSpecifier() public API." am: ad60ef88e0 am: c0f993bb04 am: f5d13c5ac5
Change-Id: I73894e4236dc5660f2eb54be3d48aa7359822947

Automerger Merge Worker   commited 2019-12-12 12:47:00 +00:00
2d41a6ebe6
Make getNetworkSpecifier() public API.
The builder lets clients set it, and this may be useful for
unit tests of apps. It should be public.
The need arises from uses of this in WiFi and Telephony
network factories.

Test: build
Bug: 135998869
Change-Id: I57279cac139c28e8654d2066ba0c60edd1e6cd98

Chalard Jean   commited 2019-12-12 13:10:55 +09:00
294ebbbad8