Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Merge "Always set NetworkInfo objects to available."
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-01-23 03:29:58 +00:00
d6f075f7af
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

Lorenzo Colitti   commited 2020-01-23 09:35:55 +09:00
109d5dc28b
Merge "Make TetheringManager to system API"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-01-23 00:11:49 +00:00
30a60ba747
Merge "Update NetworkInfo public API."
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-22 16:38:59 +00:00
9e248efd4c
Merge "Add API for CaptivePortalData" am: 1c42b174ed am: 12ad1433c1 am: f807f17797
Change-Id: I951f2eb2a0e2550f65ac87a84b76ea68c2449423

Automerger Merge Worker   commited 2020-01-22 16:27:53 +00:00
fe136ea5cf
Merge "Add NetworkCapabilities#getSSID to SystemApi" am: 7c25b78583 am: 2cab87c895 am: 93a1ccf499
Change-Id: I9bc5d535a809f4873786edbd126ee6ab7a1a293d

Automerger Merge Worker   commited 2020-01-22 16:01:10 +00:00
11d3481a41
Merge "Add API for CaptivePortalData"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-01-22 15:55:17 +00:00
1c42b174ed
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

markchien   authored and   Remi NGUYEN VAN   commited 2020-01-23 00:41:59 +09:00
5058987bd7
Merge "Add NetworkCapabilities#getSSID to SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-22 15:23:07 +00:00
7c25b78583
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

Chalard Jean   authored and   Roshan Pius   commited 2020-01-22 06:07:00 -08:00
04a2e63ed8
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
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

Sarah Chin   commited 2020-01-21 20:29:47 -08:00
d30bfe0174
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
New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
Bug: 139268426
Test: FrameworkWifiTests
Change-Id: Id13fcf41e05fd1eb26c86717e2684c724b94e401

Chalard Jean   commited 2020-01-21 18:30:31 +09:00
5f617f9a07
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
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
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

Chalard Jean   commited 2020-01-20 12:54:52 +09:00
01b6ba4053
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

Chalard Jean   commited 2020-01-20 12:54:52 +09:00
101719ce8e
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

🌶️Sam Sacco°͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌ne   commited 2020-01-18 21:10:40 +00:00
72106b0b48
Add a systemapi constructor for NetworkAgent
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
      make doc-comment-check-docs
Change-Id: I288ea32fac07a9a486e2ea451a2c9b098446a74c

Chalard Jean   commited 2020-01-17 14:58:01 +09:00
fd1758d45e
Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer" am: b2ff467a3a am: b5d058e25d am: 0fee898931
Change-Id: I9aee20185e189e51d537b6b0895fdc31c31d0ea2

Automerger Merge Worker   commited 2020-01-15 18:39:33 +00:00
db2f8836de
Merge "Replace StringNetworkSpecifier & subId with TelephonyNetworkSpecifer"
Rambo Wang   authored and   Gerrit Code Review   commited 2020-01-15 17:45:58 +00:00
b2ff467a3a
Merge "NetworkAgent: Fix doc build fail by invalid tag"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-15 14:59:04 +00:00
cdca11bf4a
NetworkAgent: Fix doc build fail by invalid tag
Bug: 138306002
Bug: 139268426
Test: make doc-comment-check-docs

Change-Id: I8b8df5096b90ad10545087ab09f68ecae637aa35

markchien   authored and   Mark Chien   commited 2020-01-15 12:58:25 +00:00
6079c4d8eb
Merge "Expose ConnectivityManager#TYPE_WIFI_P2P as SystemApi" am: 7916449753 am: 494d63249a am: c80e25552e
Change-Id: Iece2ad4133751a8c258f64d7796158ffe90881ce

Automerger Merge Worker   commited 2020-01-15 12:33:59 +00:00
87172aeccf
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
Merge "Make most of NetworkAgent @SystemApi."
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-01-15 09:56:31 +00:00
9f5958083f
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
Make most of NetworkAgent @SystemApi.
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: I856f01f02c35c2f6a886d8b98039e5dfbc48148b

Lorenzo Colitti   authored and   Chalard Jean   commited 2020-01-15 16:05:26 +09:00
980ed12f7f
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
Merge "Unhide NetworkRequest API which use legacy type"
Mark Chien   authored and   Android (Google) Code Review   commited 2020-01-15 04:29:15 +00:00
997956750f
Merge "Add NetworkRequest#satisfiedBy to SystemApi"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-01-15 04:14:32 +00:00
44637dd69d
Merge "Remove framework code that has moved to frameworks/libs/net"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-01-15 02:47:52 +00:00
2904732e77
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
Merge "Expose SocketKeepalive#SUCCESS as SystemApi"
Paul Hu   authored and   Android (Google) Code Review   commited 2020-01-15 02:44:32 +00:00
4d68e42338
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" am: 9fef5a5cf0 am: 6426059fa3 am: 2be2e8d19f
Change-Id: Idd26f3118e879ab05a8cdd23a9e4999b3bafbf47

Automerger Merge Worker   commited 2020-01-14 15:32:07 +00:00
80911190ca
Merge "Make NattKeepalivePacketData @SystemApi"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-01-14 14:36:09 +00:00
9fef5a5cf0
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

paulhu   commited 2020-01-14 21:42:56 +08:00
ce12f80581
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
Change-Id: I1d4a928256951397cabde5c352a872fd48d85859

Remi NGUYEN VAN   commited 2020-01-14 21:45:38 +09:00
04b18a9e7b
Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      atest ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef

Aaron Huang   authored and   Chalard Jean   commited 2020-01-14 18:10:39 +09:00
2429c7091c
Merge "Have registerNetworkAgent return a Network."
Chalard Jean   authored and   Android (Google) Code Review   commited 2020-01-14 07:06:37 +00:00
1426060355
Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi" am: baf25cde90 am: 385ec77624 am: de99f55513
Change-Id: I5706151c291cbdbc3a1f73ebb3669f56a61509ba

Automerger Merge Worker   commited 2020-01-14 06:27:10 +00:00
abf06a174d