Commit graph android_packages_modules_Co.../core/java
Message SHA1
Merge changes from topic "connectivity-diagnostics-system-server"
* changes:
  Add ConnectivityDiagnosticsManager to System Server.
  Make DataStallReport Parcelable.
  Make ConnectivityReport Parcelable.

Cody Kesting   authored and   Gerrit Code Review   commited 2020-01-23 01:56:33 +00:00
880e0654e7
Merge "Add API for CaptivePortalData"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-01-22 15:55:17 +00:00
1c42b174ed
Merge "Add NetworkCapabilities#getSSID to SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-22 15:23:07 +00:00
7c25b78583
Add NetworkCapabilities#getSSID to SystemApi
setSSID was added to the API, so it makes sense to have getSSID be part
of the API as well.

Test: m
Bug: 139268426
Change-Id: I6fa9c513ce4fb8ce1e3530776ce8fd5b2e77055e

Remi NGUYEN VAN   commited 2020-01-22 22:52:53 +09:00
ca455afb4d
Add API for CaptivePortalData
CaptivePortalData will be used to hold data advertised by the network
following RFC7710bis.

To fetch the CaptivePortalData, the API URL is added to LinkProperties,
to be provided by the NetworkAgent.

Because CaptivePortalData can be used to guess user location (especially
from the URLs provided by the portal), it is only exposed to
applications that have privileged permissions.

Test: atest FrameworksNetTests
Bug: 139269711
Change-Id: I341175b5fece8ee00e19898af5e8eabe66cefbf3

Remi NGUYEN VAN   commited 2020-01-22 22:27:44 +09:00
0a65eeda32
Merge changes from topic "networkagent"
* changes:
  Add a Builder to NetworkAgentConfig, and make it SystemApi.
  Rename NetworkMisc to NetworkAgentConfig.

Chiachang Wang   authored and   Gerrit Code Review   commited 2020-01-22 05:27:51 +00:00
239fb6480f
Merge "Make NetworkAgent stop subclassing Handler."
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-01-22 04:33:31 +00:00
f1449b0ba5
Add ConnectivityDiagnosticsManager to System Server.
ConnectivityDiagnosticsManager should be accessed through
Context#getService. In order for this to be possible, it needs to be
defined as a service inside SystemServiceRegistry.

Bug: 146444622
Test: compiles.
Test: CTS testing in aosp/1211164
Change-Id: I6fe29441ecc9967a04ceb394b3bbe54830bef079

Cody Kesting   commited 2020-01-21 08:31:56 -08:00
fa7693d4f9
Merge "Add NetworkRequest#satisfiedBy to SystemApi"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-01-21 14:12:27 +00:00
2812b46691
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
Merged-In: I1d231ec2ddcff97c039bcbc815a39c1d3e26c410

Lorenzo Colitti   authored and   Chiachang Wang   commited 2020-01-21 13:12:15 +00:00
8f304608c7
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
Merged-In: I621cfbe165996c67b201ca2dd2f95a5ab9af10ee

Lorenzo Colitti   authored and   Chiachang Wang   commited 2020-01-21 12:57:27 +00:00
ab2fed7241
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
Merged-In: I79478ceff6bbcae879d1025098d177de0d15dbee

Lorenzo Colitti   authored and   Chiachang Wang   commited 2020-01-21 12:55:29 +00:00
cbd8f2a7a3
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
Merged-In: I1d4a928256951397cabde5c352a872fd48d85859
Change-Id: I1d4a928256951397cabde5c352a872fd48d85859
(clean cherry-pick from internal branch)

Remi NGUYEN VAN   commited 2020-01-21 12:11:52 +09:00
59917caa0e
Make DataStallReport Parcelable.
DataStallReport is defined inside ConnectivityDiagnosticsManager. In
order for DataStallReport to be used in aidls, it must implement the
Parcelable interface.

Bug: 143187964
Test: compiles
Test: atest FrameworksNetTests
Change-Id: Idbb4885e2f67fb3f85d406a622ae45d34492dca4

Cody Kesting   commited 2020-01-20 18:02:09 -08:00
3d97b5e635
Make ConnectivityReport Parcelable.
ConnectivityReport is defined inside ConnectivityDiagnosticsManager. In
order for ConnectivityReport to be used in aidl interfaces, it must
implement the Parcelable interface.

Bug: 143187964
Test: compiles
Test: atest FrameworksNetTests
Change-Id: I8e862c78bd84b5da14203f61ce44beb1ca4a623d

Cody Kesting   commited 2020-01-20 18:02:09 -08:00
beb41b5457
Have registerNetworkAgent return a Network.
This is more useful.

Bug: 135998869
Test: FrameworkNetTests FrameworksWifiTests
Change-Id: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
Merged-In: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669

Chalard Jean   authored and   Chiachang Wang   commited 2020-01-20 16:22:06 +08:00
f78c964538
Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer"
Rambo Wang   authored and   Gerrit Code Review   commited 2020-01-15 17:45:58 +00:00
b2ff467a3a
Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-15 11:42:11 +00:00
7916449753
Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests

Change-Id: I77cb45e6b2aaf4ab2c457cb59ccf77b1b8c01fa9

paulhu   commited 2020-01-15 15:38:23 +08:00
e102b0bb49
Merge "Unhide NetworkRequest API which use legacy type"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-15 06:49:33 +00:00
a64019915e
Merge "Expose SocketKeepalive#SUCCESS as SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-15 05:01:04 +00:00
4ed1963c4a
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
Merged-In: I94171b2dc4f26442df918547bf8bc40953f63f2e

paulhu   authored and   Paul Hu   commited 2020-01-15 02:45:43 +00:00
2f7c345d56
Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer
StringNetworkSpecifier is widely used to specify subscription id for
the NetworkRequest. The raw string field introduce ambiguity and leave
large space for bugs. With TelephonyNetworkSpecifer, we are able to
settle down the type and value of the fields (although currently only
one) and introduce validation to detect the bug in the beginning.

Bug: 145993724
Test: atest FrameworksNetTests FrameworksTelephonyTests &
      make offline-sdk-docs
Change-Id: Iefbad9b1deb3de2c0b262d9ce5ae0704a50d08a6

Rambo Wang   commited 2020-01-14 10:51:11 -08:00
582ba554de
Merge "Make NattKeepalivePacketData @SystemApi"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-01-14 14:36:09 +00:00
9fef5a5cf0
Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-01-14 05:30:14 +00:00
baf25cde90
Unhide NetworkRequest API which use legacy type
Bug: 144753389
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I349da06769e9ffcee6bb42f51ab454e0ef774fb3
Merged-In: I349da06769e9ffcee6bb42f51ab454e0ef774fb3

markchien   authored and   Mark Chien   commited 2020-01-14 04:56:54 +00:00
d6eeffd079
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

paulhu   commited 2020-01-14 10:02:30 +08:00
74357e70a8
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
Make NattKeepalivePacketData @SystemApi
Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests

Change-Id: I687f1a8a4b82cb7e4a0dfeb24f0b23a4de6d5287

Aaron Huang   commited 2020-01-14 01:45:28 +08:00
aead9c64fa
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
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"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-10 09:27:31 +00:00
0e82d1c50d
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."
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"
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."
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
Merge "Change tetheroffloadjni to tetheringutilsjni"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-07 09:05:43 +00:00
0af9d37eca
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
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
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
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
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
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e

markchien   commited 2019-12-19 20:53:06 +08:00
5776f96096