Commit Graph

7758 Commits

Author SHA1 Message Date
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
Remi NGUYEN VAN
12ad1433c1 Merge "Add API for CaptivePortalData"
am: 1c42b174ed

Change-Id: Iaf58a9dbba5fd5fbe45ec4d795585efe9e3a9e2a
2020-01-22 08:05:11 -08:00
Remi NGUYEN VAN
1c42b174ed Merge "Add API for CaptivePortalData" 2020-01-22 15:55:17 +00: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
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
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
Chiachang Wang
e348a88aeb Merge "Make NetworkAgent stop subclassing Handler."
am: f1449b0ba5

Change-Id: Ie308e86e1b1173b0ec7fb7ac4a4f0b6c2bcfafa6
2020-01-21 20:42:19 -08:00
Chiachang Wang
f1449b0ba5 Merge "Make NetworkAgent stop subclassing Handler." 2020-01-22 04:33:31 +00:00
Chiachang Wang
5c6a0c74ff Merge "Make NetworkCapabilities authoritative for roaming state"
am: b32eec22b2

Change-Id: I85043174796af8d37a390786e37993bd224a644a
2020-01-21 20:14:58 -08:00
Chiachang Wang
a256726fcc Merge "Make NetworkCapabilities authoritative for suspended state"
am: 445186aa82

Change-Id: I64db872c2b10972adc3feeb4121dbdf2753226e9
2020-01-21 20:09:36 -08:00
Chiachang Wang
b32eec22b2 Merge "Make NetworkCapabilities authoritative for roaming state" 2020-01-22 03:30:09 +00:00
Chiachang Wang
445186aa82 Merge "Make NetworkCapabilities authoritative for suspended state" 2020-01-22 03:29:42 +00:00
Cody Kesting
fa7693d4f9 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
27d2bbc474 Merge "Add NetworkRequest#satisfiedBy to SystemApi"
am: 2812b46691

Change-Id: I817020ac31dec9e10ea27fa38f07250f5c447de1
2020-01-21 06:21:11 -08:00
Remi NGUYEN VAN
2812b46691 Merge "Add NetworkRequest#satisfiedBy to SystemApi" 2020-01-21 14:12:27 +00:00
Lorenzo Colitti
8f304608c7 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
ab2fed7241 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
cbd8f2a7a3 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
f414222461 Merge changes I904d87c0,I9ef468a1
am: 85768e2dc3

Change-Id: I4edaf325eb0d18d9871bb3cda8005433e2e40132
2020-01-21 04:29:18 -08:00
Chalard Jean
62edfd8779 [NS A25] Send all listen callbacks after all rematches
Reupload of I2db9535b1d72edd46b968b1bae66b148aa815235 with a
bugfix.

Bug: 113554781
Test: ConnectivityServiceTests NetworkStackTests
Change-Id: I904d87c01d9422ba6233d22a189e8017dd298d37
2020-01-21 19:06:04 +09:00
Chalard Jean
9fc27eab94 [NS A24] Add an object to represent changes in assignment
Reupload of I703db6d3f039bd67a90fad0eadffc6cfed9a50ee

Test: ConnectivityServiceTest
Change-Id: I9ef468a17ebcfa684e5614b25dc06fc67eb71c79
2020-01-21 19:05:48 +09:00
Remi NGUYEN VAN
f45fcda616 Merge "Remove handling of EVENT_UNFULFILLABLE_REQUEST"
am: 3b74d613e0

Change-Id: I0207294af01a5cc9594f563398753370e3c7e011
2020-01-20 23:05:12 -08:00
Remi NGUYEN VAN
3b74d613e0 Merge "Remove handling of EVENT_UNFULFILLABLE_REQUEST" 2020-01-21 05:52:05 +00:00
Remi NGUYEN VAN
59917caa0e 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
Remi NGUYEN VAN
82b5bb6d4f Remove handling of EVENT_UNFULFILLABLE_REQUEST
This message is not being sent by any component anymore.

Test: built, flashed, WiFi and telephony working
Test: atest FrameworksNetTests
Bug: 138306002
Merged-In: I5b1ec3136ae8a0a6928e0fb2cda3d5f5e2ca657f
Change-Id: I5b1ec3136ae8a0a6928e0fb2cda3d5f5e2ca657f
(clean cherry-pick from internal branch)
2020-01-21 12:10:34 +09:00
Chiachang Wang
59b776a9e5 Merge "Have registerNetworkAgent return a Network."
am: 061d68a40c

Change-Id: I49684d1079d618414149199d2cfe128bd71f7b16
2020-01-20 18:06:33 -08:00
Cody Kesting
3d97b5e635 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
beb41b5457 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
af14ca4fd1 Make NetworkCapabilities authoritative for roaming state
...instead of NetworkInfo

Bug: 138306002
Test: FrameworksNetTests FrameworksTelephonyTests
Change-Id: Ifdea19fa32089b5c7925f5010169b1dea3d2b304
Merged-In: Ifdea19fa32089b5c7925f5010169b1dea3d2b304
2020-01-20 10:45:48 +00:00
Chalard Jean
d61375df7c Make NetworkCapabilities authoritative for suspended state
...instead of NetworkInfo

Bug: 138306002
Test: FrameworksNetTests FrameworksTelephonyTests
Change-Id: I4808fcc0047a926b23ed3d49d979bb7b0371dc69
Merged-In: I4808fcc0047a926b23ed3d49d979bb7b0371dc69
2020-01-20 10:37:29 +00:00
Chalard Jean
f78c964538 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
Xin Li
c926be1028 DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Rambo Wang
b5d058e25d Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer"
am: b2ff467a3a

Change-Id: Ifc07007c5bdf74199c7618fa089745eab99f95be
2020-01-15 10:08:51 -08:00
Rambo Wang
b2ff467a3a Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" 2020-01-15 17:45:58 +00:00
paulhu
494d63249a Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi"
am: 7916449753

Change-Id: I27cb6214bf5a42c9120dd871228b224cd41e1199
2020-01-15 04:03:29 -08:00
Treehugger Robot
7916449753 Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi" 2020-01-15 11:42:11 +00:00
paulhu
e102b0bb49 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
Mark Chien
8dbe02fe3f Merge "Unhide NetworkRequest API which use legacy type"
am: a64019915e

Change-Id: Ie6f4021c758aececda5628ba5f0e3b59f1aff42d
2020-01-14 23:06:28 -08:00
Mark Chien
a64019915e Merge "Unhide NetworkRequest API which use legacy type" 2020-01-15 06:49:33 +00:00
paulhu
f0049fe598 Merge "Expose SocketKeepalive#SUCCESS as SystemApi"
am: 4ed1963c4a

Change-Id: I26e3d04bb9c5c895bf8f9a20d3cc1c5caf87db1e
2020-01-14 21:08:13 -08:00
Treehugger Robot
4ed1963c4a Merge "Expose SocketKeepalive#SUCCESS as SystemApi" 2020-01-15 05:01:04 +00:00
paulhu
2f7c345d56 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
Rambo Wang
582ba554de 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
2020-01-14 10:51:11 -08:00
Aaron Huang
6426059fa3 Merge "Make NattKeepalivePacketData @SystemApi"
am: 9fef5a5cf0

Change-Id: I6d212d1b830f29b8d8a77c727bfa23572f7e08a6
2020-01-14 07:03:31 -08:00
Aaron Huang
9fef5a5cf0 Merge "Make NattKeepalivePacketData @SystemApi" 2020-01-14 14:36:09 +00:00