Commit Graph

8338 Commits

Author SHA1 Message Date
Jack Yu
05d5b3b59f 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
Cody Kesting
d199a9db39 Add AIDL for registering ConnectivityDiagnosticCallbacks.
ConnectivityService needs to allow for registering and unregistering
ConnectivityDiagnosticsCallbacks as part of ConnectivityDiagnostics API.
These methods will be used by ConnectivityDiagnosticsManager so that
privileged applications can receive notifications on network events by
the system.

Bug: 146444622
Test: compiles
Change-Id: Id00b30af5692db5eef47d0d948897148578d3b32
2020-01-23 11:30:04 -08:00
Cody Kesting
3e7fb38355 Define ConnectivityDiagnosticsCallback IBinder impl.
An IBinder implementation of the ConnectivityDiagnosticsCallback AIDL is
needed so that apps can receive notfications with their registered
callbacks for callbacks coming from ConnectivityService.

Bug: 143187964
Bug: 147848028
Test: compiles
Test: atest FrameworksNetTests
Change-Id: Ie62678f794d81e1edee68977ec684a911b5070b7
2020-01-23 11:30:04 -08:00
Automerger Merge Worker
f11b5198ad Merge "Add list of Administrator UIDs to NetworkCapabilities." am: 452ccae317 am: 347f56c836
Change-Id: I1636f33bf5667442ee9a0b9d463e1ce4bcb2b737
2020-01-23 18:28:04 +00:00
Cody Kesting
347f56c836 Merge "Add list of Administrator UIDs to NetworkCapabilities."
am: 452ccae317

Change-Id: I7e5d0950ba99419d83fed6922a8f29aa530d4b00
2020-01-23 10:18:02 -08:00
Cody Kesting
452ccae317 Merge "Add list of Administrator UIDs to NetworkCapabilities." 2020-01-23 17:52:58 +00:00
Automerger Merge Worker
bfd81af9ef Merge "Define Bundle keys for ConnectivityDiagnostics." am: eedaa1f471 am: e049dc0e3d
Change-Id: Icbc4c95ebb4337d5c5b371e2fc7fc893e86cfe17
2020-01-23 17:05:21 +00:00
Nathan Harold
e049dc0e3d Merge "Define Bundle keys for ConnectivityDiagnostics."
am: eedaa1f471

Change-Id: I2a5ac28aea190d06dc2e7e6f8bb9950e0a18e3f7
2020-01-23 08:43:27 -08:00
Nathan Harold
eedaa1f471 Merge "Define Bundle keys for ConnectivityDiagnostics." 2020-01-23 16:34:16 +00:00
markchien
d19ef10d00 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
Cody Kesting
d6ad3365fa Define Bundle keys for ConnectivityDiagnostics.
ConnectivityDiagnosticsManager defines several callbacks that can be
invoked for registered ConnectivityDiagnosticsCallback instances.
onConnectivityReport and onDataStallSuspected include ConnectivityReport
and DataStallReport, respectively, both of which contain a
PersistableBundle to be used for passing information from the
NetworkStack module to the registered callback. When values will be
consistently passed inside these bundles, their keys are defined inside
ConnectivityReport and DataStallReport.

Bug: 147249364
Test: compiles
Test: atest FrameworksNetTests
Change-Id: Icc6bd4337865692b6ca7c18eacabff59ba3a5bb9
2020-01-23 00:49:17 -08:00
Cody Kesting
896939854b Add list of Administrator UIDs to NetworkCapabilities.
Adds a list of administrator UIDs to NetworkCapabilties. The carrier
privilege permission model allows multiple uids to be granted
network-management privileges via certificates stored on a SIM card or
in CarrierConfigManager. The current NetworkCapabilities only allows a
single uid to be stored to track the owner of the network - this change
remedies that discrepancy.

Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: I3169d31e0270c976a720e80363cb268cbafd0455
2020-01-22 23:59:56 -08:00
Automerger Merge Worker
7d995a3a6d Merge "Fix generic inferred type argument." am: 7e5cce2c67 am: e3acc01753
Change-Id: Ia4a304e8a62ca920cf51647ced2a1ea841c8dca2
2020-01-23 07:09:35 +00:00
Cody Kesting
e3acc01753 Merge "Fix generic inferred type argument."
am: 7e5cce2c67

Change-Id: I5ac5579440d309c583debe5ce876721a84460c84
2020-01-22 22:45:49 -08:00
Treehugger Robot
7e5cce2c67 Merge "Fix generic inferred type argument." 2020-01-23 06:39:57 +00:00
Automerger Merge Worker
53133f708e Merge changes from topic "add-ikev2-vpn-types" am: adb79e3b39 am: 6e1557d8ca
Change-Id: I91759cf3b68f89500352c6d952643a45e0665ee2
2020-01-23 06:18:15 +00:00
Benedict Wong
6e1557d8ca Merge changes from topic "add-ikev2-vpn-types"
am: adb79e3b39

Change-Id: I205121bbd8ef8adbe5e7a5ea1c57bbcac0efae0e
2020-01-22 22:09:41 -08:00
Cody Kesting
ec88fda4a8 Fix generic inferred type argument.
Test: compiles.
Test: atest FrameworksNetTests
Change-Id: I0dffb3f44fb465ac8bae3c41f26176e86f65e825
2020-01-22 20:26:08 -08:00
Automerger Merge Worker
09d6510316 Merge changes from topic "connectivity-diagnostics-system-server" am: 880e0654e7 am: d2e0f29a08 am: b2a91a533d
Change-Id: If70281f2989778896eb34ac65bcfe0215393ef60
2020-01-23 03:41:09 +00:00
Lorenzo Colitti
d6f075f7af Merge "Always set NetworkInfo objects to available." 2020-01-23 03:29:58 +00:00
Automerger Merge Worker
b2a91a533d Merge changes from topic "connectivity-diagnostics-system-server" am: 880e0654e7 am: d2e0f29a08
Change-Id: Iae96f4e55ff74b48275b1559443ba982bb935bbc
2020-01-23 03:28:21 +00:00
Benedict Wong
80240acd3f Add VpnManger API surface
This change adds the VpnManager, which will be used by apps to install
profiles for all platform VPN types (currently only IKEv2).

Bug: 143325939
Test: Compiles, FrameworksNetTests passing.
Change-Id: I57f854d0a5b18358f3541c24ca0cd8aed03fd7a1
2020-01-22 19:24:24 -08:00
Benedict Wong
5642043367 Add Ikev2VpnProfile as public API
This change adds configuration classes for Platform VPNs, with the
extensibility for further platform VPNs to be added in future.

Profile validity is checked upon construction, and upon changing
conversion from VpnProfile instances. Internal storage and method calls
all use VpnProfiles to allow for reuse of existing infrastructure.
However, when Platform VPN implementations are started, the internal
VpnProfile will be converted back into the respective
PlatformVpnProfile for validity checking.

Bug: 143325939
Test: Compiles, FrameworksNetTests passing.
Change-Id: I3c375fb08c132fc062e893c375f5c36460122162
2020-01-22 19:23:01 -08:00
Benedict Wong
d439f790c3 Add additional fields to VpnProfile for profile-based IKEv2/IPsec VPNs
This commit adds the fields required to support IKEv2/IPsec VPNs. Other
fields will be reused where possible.

Bug: 143221465
Test: Compiles, new tests written for parcel/unparcel, encode/decode
Change-Id: I4c0e8fb934e75548424a15bbfb35c2ea9a3a57bc
2020-01-22 19:23:00 -08:00
Cody Kesting
d2e0f29a08 Merge changes from topic "connectivity-diagnostics-system-server"
am: 880e0654e7

Change-Id: I48a9f1f734b5e2dd4f7ed91c052cec5c8c62c076
2020-01-22 19:10:05 -08:00
Cody Kesting
880e0654e7 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
109d5dc28b 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
30a60ba747 Merge "Make TetheringManager to system API" 2020-01-23 00:11:49 +00:00
TreeHugger Robot
9e248efd4c Merge "Update NetworkInfo public API." 2020-01-22 16:38:59 +00:00
Automerger Merge Worker
fe136ea5cf Merge "Add API for CaptivePortalData" am: 1c42b174ed am: 12ad1433c1 am: f807f17797
Change-Id: I951f2eb2a0e2550f65ac87a84b76ea68c2449423
2020-01-22 16:27:53 +00:00
Automerger Merge Worker
f807f17797 Merge "Add API for CaptivePortalData" am: 1c42b174ed am: 12ad1433c1
Change-Id: Ifed2e05d433dda40615af4b41d1f8cf4e9445de0
2020-01-22 16:19:10 +00:00
Remi NGUYEN VAN
12ad1433c1 Merge "Add API for CaptivePortalData"
am: 1c42b174ed

Change-Id: Iaf58a9dbba5fd5fbe45ec4d795585efe9e3a9e2a
2020-01-22 08:05:11 -08:00
Automerger Merge Worker
11d3481a41 Merge "Add NetworkCapabilities#getSSID to SystemApi" am: 7c25b78583 am: 2cab87c895 am: 93a1ccf499
Change-Id: I9bc5d535a809f4873786edbd126ee6ab7a1a293d
2020-01-22 16:01:10 +00:00
Remi NGUYEN VAN
1c42b174ed Merge "Add API for CaptivePortalData" 2020-01-22 15:55:17 +00:00
Automerger Merge Worker
93a1ccf499 Merge "Add NetworkCapabilities#getSSID to SystemApi" am: 7c25b78583 am: 2cab87c895
Change-Id: I5d98ddd28ac963615b0a00441b8716f32602fbe8
2020-01-22 15:47:20 +00:00
markchien
5058987bd7 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
Remi NGUYEN VAN
2cab87c895 Merge "Add NetworkCapabilities#getSSID to SystemApi"
am: 7c25b78583

Change-Id: I56b30b2719d30660e2efb32a01ab0ce4f7b30236
2020-01-22 07:30:49 -08:00
Treehugger Robot
7c25b78583 Merge "Add NetworkCapabilities#getSSID to SystemApi" 2020-01-22 15:23:07 +00:00
Chalard Jean
04a2e63ed8 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
ca455afb4d 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
0a65eeda32 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
Jack Yu
374d3d144b Merge "API changes for IPv6 MTU support" 2020-01-22 07:38:53 +00:00
Automerger Merge Worker
6ee51d9c82 [automerger skipped] Merge changes from topic "networkagent" am: 239fb6480f am: 9b75818ff9 am: c1c4793bd1 -s ours
am skip reason: Change-Id I1d231ec2ddcff97c039bcbc815a39c1d3e26c410 with SHA-1 5b2e000f6d is in history

Change-Id: I02e5d9766706423e52f275bc8a3ecbdf674a8e44
2020-01-22 05:49:47 +00:00
Automerger Merge Worker
f5769a53b7 [automerger skipped] Rename NetworkMisc to NetworkAgentConfig. am: ab2fed7241 am: 8e9c48d49b am: 832b20610b -s ours
am skip reason: Change-Id I621cfbe165996c67b201ca2dd2f95a5ab9af10ee with SHA-1 8dd13a8109 is in history

Change-Id: I695c6f3327cb1e2954c4b5d60315509fb61771af
2020-01-22 05:49:44 +00:00
Automerger Merge Worker
c1c4793bd1 Merge changes from topic "networkagent" am: 239fb6480f am: 9b75818ff9
Change-Id: I4815caf8d3fb63f2b585b231b2d926e381b26010
2020-01-22 05:37:25 +00:00
Automerger Merge Worker
832b20610b Rename NetworkMisc to NetworkAgentConfig. am: ab2fed7241 am: 8e9c48d49b
Change-Id: I88bad8a6a119e3d137670653b7eeaf3cbc02aed8
2020-01-22 05:37:22 +00:00
Chiachang Wang
9b75818ff9 Merge changes from topic "networkagent"
am: 239fb6480f

Change-Id: Iaebb3aaced18257f4beffacc13a0d87efa1a7ec7
2020-01-21 21:32:52 -08:00
Lorenzo Colitti
8e9c48d49b Rename NetworkMisc to NetworkAgentConfig.
am: ab2fed7241

Change-Id: I1dae34487a5ea484c17895a2d7ae694e8ae1973a
2020-01-21 21:32:30 -08:00
Chiachang Wang
239fb6480f 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
Automerger Merge Worker
88bf49c58b [automerger skipped] Merge "Make NetworkAgent stop subclassing Handler." am: f1449b0ba5 am: e348a88aeb am: e6e3a87c74 -s ours
am skip reason: Change-Id I79478ceff6bbcae879d1025098d177de0d15dbee with SHA-1 c58ecd5f33 is in history

Change-Id: I9f190f10f21094aadba865ce8e987f75e071aa05
2020-01-22 05:02:29 +00:00