Commit Graph

1921 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
a09393703b Merge "Allows the caller to specify configuration by TetheringRequest" 2020-01-24 02:38:52 +00:00
Nathan Harold
f6fc8abbb0 Fix javadoc build break s/line/link/
Bug: 148248781
Test: compilation
Change-Id: I9df208a9b063b71b2f6cc3099005d1ab38044cd2
2020-01-23 18:03:46 -08:00
Jack Yu
01494a73e2 Added expiration time and deprecation time support
Added link address deprecation time and expiration
time for SSC mode 3 support.

Bug: 135717900
Bug: 142949345
Test: LinkAddressTest

Change-Id: Ibc030d2a70ded66e00dd3bdae209609b9118de78
2020-01-23 14:53:43 -08:00
markchien
10ddd02848 Allows the caller to specify configuration by TetheringRequest
This is initial work to allow caller to pass their prefered
configuration to start tethering. Caller may able to specify the
downstream interface ipv4 address with dhcp server disabled for
static IP configuration, or able to exempt entitlement check if
they have permission in follow up CL.

Bug: 141256482
Test: -atest TetheringTest
      -ON/OFF wifi tethering

Change-Id: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3
2020-01-23 23:19:23 +09:00
Automerger Merge Worker
7eb8667be6 Merge changes from topic "connectivity-diagnostics-system-server" am: fd47d34d34 am: 05bea2cbd5 am: 346f8902c2
Change-Id: If70281f2989778896eb34ac65bcfe0215393ef60
2020-01-23 03:41:09 +00:00
Lorenzo Colitti
d2153ad675 Merge "Always set NetworkInfo objects to available." 2020-01-23 03:29:58 +00:00
Cody Kesting
fd47d34d34 Merge changes from topic "connectivity-diagnostics-system-server"
* changes:
  Add ConnectivityDiagnosticsManager to System Server.
  Make DataStallReport Parcelable.
  Make ConnectivityReport Parcelable.
2020-01-23 01:56:33 +00:00
Lorenzo Colitti
d58810c0c4 Always set NetworkInfo objects to available.
For all networks, NetworkInfo.isAvailble has basically always
been true for all connected networks. The new NetworkAgent API
sets it to false, and this causes application breakage. Always
set it to true.

Bug: 148126438
Test: builds, boots, searching in maps works again
Change-Id: Ia9876b0ce7f02120bd05cab526346cad22cf62b3
2020-01-23 09:35:55 +09:00
Remi NGUYEN VAN
e53a528fa3 Merge "Make TetheringManager to system API" 2020-01-23 00:11:49 +00:00
TreeHugger Robot
50953233a5 Merge "Update NetworkInfo public API." 2020-01-22 16:38:59 +00:00
Automerger Merge Worker
7b8e9c4eb8 Merge "Add API for CaptivePortalData" am: 2af00b43b5 am: bfdbb07f60 am: 1f1460e410
Change-Id: I951f2eb2a0e2550f65ac87a84b76ea68c2449423
2020-01-22 16:27:53 +00:00
Automerger Merge Worker
1d1238c818 Merge "Add NetworkCapabilities#getSSID to SystemApi" am: 026e45f305 am: ece6c2d06c am: b4da9b933d
Change-Id: I9bc5d535a809f4873786edbd126ee6ab7a1a293d
2020-01-22 16:01:10 +00:00
Remi NGUYEN VAN
2af00b43b5 Merge "Add API for CaptivePortalData" 2020-01-22 15:55:17 +00:00
markchien
75721e4b20 Make TetheringManager to system API
Also deprecated tethering APIs in ConnectivityManager.
Will have follow up change to remove @hide tethering function in
ConnectivityManager.

Bug: 145093446
Bug: 148038547
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ia432057bf9056727c4a0ca97d160a49274d33581
2020-01-23 00:41:59 +09:00
Treehugger Robot
026e45f305 Merge "Add NetworkCapabilities#getSSID to SystemApi" 2020-01-22 15:23:07 +00:00
Chalard Jean
874a85e699 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
2020-01-22 06:07:00 -08:00
Remi NGUYEN VAN
97ef87510b 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
2020-01-22 22:52:53 +09:00
Remi NGUYEN VAN
a36cf78761 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
2020-01-22 22:27:44 +09:00
Chiachang Wang
024e520f2d Merge changes from topic "networkagent"
* changes:
  Add a Builder to NetworkAgentConfig, and make it SystemApi.
  Rename NetworkMisc to NetworkAgentConfig.
2020-01-22 05:27:51 +00:00
Chiachang Wang
54a2e5c268 Merge "Make NetworkAgent stop subclassing Handler." 2020-01-22 04:33:31 +00:00
Sarah Chin
50169af6ad API changes for IPv6 MTU support
Change mtu->mtuV4 and add mtuV6 for DataProfile and DataCallResult
Add mtu to RouteInfo and update test

Test: atest FrameworksTelephonyTests
Bug: 146668814
Change-Id: I43c7e088e46e40f38d8114548e0fc4e39d7f91cb
2020-01-21 20:29:47 -08:00
Cody Kesting
a5e2cef12e 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
2020-01-21 08:31:56 -08:00
Remi NGUYEN VAN
579d60d362 Merge "Add NetworkRequest#satisfiedBy to SystemApi" 2020-01-21 14:12:27 +00:00
Lorenzo Colitti
8e5c76ea67 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
2020-01-21 13:12:15 +00:00
Lorenzo Colitti
cf59536753 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
2020-01-21 12:57:27 +00:00
Lorenzo Colitti
c64a5e0ec3 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
2020-01-21 12:55:29 +00:00
Chalard Jean
3cdf95c9dd New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
Bug: 139268426
Test: FrameworkWifiTests
Change-Id: Id13fcf41e05fd1eb26c86717e2684c724b94e401
2020-01-21 18:30:31 +09:00
Remi NGUYEN VAN
3282a74c5c 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)
2020-01-21 12:11:52 +09:00
Cody Kesting
525fe05ba1 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
2020-01-20 18:02:09 -08:00
Cody Kesting
8c0043e0f7 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
2020-01-20 18:02:09 -08:00
Chalard Jean
a973c7a8c9 Have registerNetworkAgent return a Network.
This is more useful.

Bug: 135998869
Test: FrameworkNetTests FrameworksWifiTests
Change-Id: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
Merged-In: I74710b396fa3cec6fbae08d3dcab5bc90dc2e669
2020-01-20 16:22:06 +08:00
Chalard Jean
70feed0d9b 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
2020-01-20 12:54:52 +09:00
Chalard Jean
6795123840 Add methods to send connected/disconnected state.
Also add methods to set the legacy subtype and the APN name.
These have to be added together because they have to be used
together.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: Ie90b8d290eab490061d5cb066744b67d597b9469
2020-01-20 12:54:52 +09:00
🌶️Sam Sacco°͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌ne
ac2dee9f70 Fix invalid use of @note for doc builds.
Originally introduced in https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/10087632

Change-Id: I35fc4a814238635fa95981649c27230dda319afa
2020-01-18 21:10:40 +00:00
Chalard Jean
124ecc47bf Add a systemapi constructor for NetworkAgent
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
      make doc-comment-check-docs
Change-Id: I288ea32fac07a9a486e2ea451a2c9b098446a74c
2020-01-17 14:58:01 +09:00
Automerger Merge Worker
a1a77ee7bb Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" am: cf09c64473 am: 934f40753c am: 66873f48a0
Change-Id: I9aee20185e189e51d537b6b0895fdc31c31d0ea2
2020-01-15 18:39:33 +00:00
Rambo Wang
cf09c64473 Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" 2020-01-15 17:45:58 +00:00
TreeHugger Robot
b993cc22a7 Merge "NetworkAgent: Fix doc build fail by invalid tag" 2020-01-15 14:59:04 +00:00
markchien
c23c7ba222 NetworkAgent: Fix doc build fail by invalid tag
Bug: 138306002
Bug: 139268426
Test: make doc-comment-check-docs

Change-Id: I8b8df5096b90ad10545087ab09f68ecae637aa35
2020-01-15 12:58:25 +00:00
Automerger Merge Worker
c69279d0a3 Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi" am: 5df603fce3 am: c7d39858b1 am: a3e8ee61a1
Change-Id: Iece2ad4133751a8c258f64d7796158ffe90881ce
2020-01-15 12:33:59 +00:00
Treehugger Robot
5df603fce3 Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi" 2020-01-15 11:42:11 +00:00
Lorenzo Colitti
b668629e20 Merge "Make most of NetworkAgent @SystemApi." 2020-01-15 09:56:31 +00:00
paulhu
028732ec2c 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
2020-01-15 15:38:23 +08: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
ac9ebd4d14 Merge "Unhide NetworkRequest API which use legacy type" 2020-01-15 06:49:33 +00:00
Treehugger Robot
7e7cd3b0d4 Merge "Expose SocketKeepalive#SUCCESS as SystemApi" 2020-01-15 05:01:04 +00: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
paulhu
311b769fac 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
2020-01-15 02:45:43 +00:00