Commit graph android_packages_modules_Co.../core/java
Message SHA1
Merge "Remove ConnectivityManager and its usages from NetworkStatsService."
Varun Anand   authored and   Android (Google) Code Review   commited 2019-03-01 01:14:34 +00:00
c839241101
Remove ConnectivityManager and its usages from NetworkStatsService.
NSS needed it for getting VpnInfo[], NetworkState[] and
activeLinkProperties which it used to query via ConnectivityManager.

For VpnInfo[], this was racy as NSS may ignore intermediate changes to a
VPN's underlying networks. See http://b/123961098 for more context.

It may also lead to deadlocks b/w ConnectivityService and
NetworkStatsService. See http://b/126245192 for more info.

This change will ensure that NSS is never contending on any of
ConnectivityService locks.

Bug: 123961098
Bug: 126245192
Bug: 120145746
Test: atest FrameworksNetTests
Change-Id: I57e117bb4e9efe491b19d6b5a479f2d58d1c58e6

Varun Anand   commited 2019-02-28 13:43:02 -08:00
45406bff69
Merge "Fix broken javadoc links" am: 1dd83b17a9 am: 83fa25b925
am: 5e1d1a5252

Change-Id: Iffb9cfe0928ed37db61a7f684acb2b41b74c1bfa

Chiachang Wang   authored and   android-build-merger   commited 2019-02-28 06:05:10 -08:00
f255780123
Add @UnsupportedAppUsage annotations
For packages:
  android.net
  android.net.wifi
  android.nfc

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04

Andrei Onea   authored and   Andrei-Valentin Onea   commited 2019-02-27 13:31:33 +00:00
bb27866cfb
Fix broken javadoc links
Bug: 123683994
Test: Verify with javadoc
Change-Id: I4b1b936e3cf86104ace5fcb6829778710801f2d5

Chiachang Wang   commited 2019-02-27 17:18:40 +08:00
3b723c2ee8
Merge "[CS] Support "instant failure" from factories"
Etan Cohen   authored and   Android (Google) Code Review   commited 2019-02-22 14:29:39 +00:00
bd51b3057a
Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: 399be8f9b9

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-15 00:26:34 -08:00
48eaae51e3
Merge "Remove NetworkMonitor dependency on ICaptivePortal"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-15 08:09:29 +00:00
399be8f9b9
Merge "Remove NetworkMonitor dependency on ICaptivePortal"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2019-02-15 05:39:14 +00:00
2438b45092
Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a
dependency in NetworkMonitor, as the framework class takes precedence
when linking.
Also fix NetworkMonitorTest that was not verifying the right
startCaptivePortalApp call.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I8e7bb79e50650ae182a2e4277fb49abf5fb6d910
Merged-In: Ib6a89e54312628662b130fbeec18d11e139f09fa

Remi NGUYEN VAN   commited 2019-02-15 12:20:03 +09:00
eab0f54735
Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master
Xin Li   authored and   Android (Google) Code Review   commited 2019-02-14 22:11:32 +00:00
4198f09aa7
Merge "Add Test Network and Transport types" am: 9a5d3ba1ad am: 9dd06ba6a9
am: b6848e1c03

Change-Id: Ia9c100ebeb8b54e743820b74ff35d006919e9fbb

Benedict Wong   authored and   android-build-merger   commited 2019-02-14 11:08:57 -08:00
4e34100090
Merge "Add Test Network and Transport types" am: 9a5d3ba1ad
am: 9dd06ba6a9

Change-Id: I371a4f3bdbbfd001e9694e29843b6b7119b938b0

Benedict Wong   authored and   android-build-merger   commited 2019-02-14 10:59:02 -08:00
b6848e1c03
DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393

Xin Li   commited 2019-02-14 09:48:06 -08:00
472cc5b849
Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a
dependency in NetworkMonitor, as the framework class takes precedence
when linking.
Also fix NetworkMonitorTest that was not verifying the right
startCaptivePortalApp call.

(cherry-pick of aosp/904953 with minor conflict in Android.bp)

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib6a89e54312628662b130fbeec18d11e139f09fa

Remi NGUYEN VAN   commited 2019-02-14 20:36:40 +09:00
ad9f6d89f6
[CS] Support "instant failure" from factories
Add a mechanism by which a factory can declare "instant failure" for
a request - which would result in it getting an OnUnavailable()
(even without a timeout).

Factories may only do this iff:
1. They know they are the only factory which may fulfill this
   request (common for transport-specific requests).
2. The know that the request can definitely not be
   fulfilled at any point in the future.

Bug: 31382922
Test: atest ConnectivityServiceTest
Change-Id: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5

Etan Cohen   commited 2019-02-13 08:44:51 -08:00
4ad1b9f839
Add Test Network and Transport types
This change adds new network types for testing purposes, signifying a
network with an extremely limited feature set.

Bug: 72950854
Test: Compiles, CTS tests relying on this work correctly.
Change-Id: I06cade6044afd12e0b69ed3c2f160f27f85d43d0

Benedict Wong   commited 2019-02-11 12:57:43 -08:00
bdfaa48ced
Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66 am: 640909fadf
am: d98c01d468

Change-Id: I54a32dd01f1f697fc7da703bc1d258ed6a43df23

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-06 19:08:29 -08:00
f7bdf02a86
Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66
am: 640909fadf

Change-Id: Ie428acbfce0f94f0bade67258fefbb3253a539df

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-06 18:58:57 -08:00
d98c01d468
Merge "Add API for NetworkStack to start captive portal"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-07 02:39:17 +00:00
9d0e114e66
Merge "[KA04] Expose TCP socket keepalive API" am: b099846c86 am: f924dfe504
am: 3e622644b4

Change-Id: I490acd417b3f70ba1dec3bbf9f049088b849c782

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 07:41:19 -08:00
1342d99e50
Merge "[KA04] Expose TCP socket keepalive API" am: b099846c86
am: f924dfe504

Change-Id: Ia5c108bfa42ab0de9d4cdf676c5980dc9a9aba12

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 07:31:44 -08:00
3e622644b4
[KA04] Expose TCP socket keepalive API
The new set of API allows applications to request keepalives
offload for established TCP sockets over wifi.

However, the application must not write to or read from the
socket after calling this method, until specific callbacks are
called.

Bug: 114151147
Test: atest FrameworksNetTests FrameworksWifiTests NetworkStackTests

Change-Id: I3880505dbc35fefa34ef6c79555458ecf5d296a4

junyulai   authored and   Chalard Jean   commited 2019-02-06 22:51:42 +09:00
0835a1eaea
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa am: 90cad47708
am: aa12af640b

Change-Id: I700550160c795becb4c3e37a88328488846d272f

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:47:49 -08:00
cd6d2a46eb
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa
am: 90cad47708

Change-Id: I3b0645585140d8ee12f896946a2a1fbb519e6195

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:38:31 -08:00
aa12af640b
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData"
Chalard Jean   authored and   Gerrit Code Review   commited 2019-02-06 09:19:07 +00:00
6e55aca3fa
Merge "Deprecate getActiveLinkProperties." am: 39d46d221b am: 10a24f1d46
am: 7bb6a9ed3e

Change-Id: I364a5420ab6552f652fa40a6607af249f92770c6

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:03:25 -08:00
8ee0ccedf5
Merge "Deprecate getActiveLinkProperties." am: 39d46d221b
am: 10a24f1d46

Change-Id: Iab302f94c8b33373831e1aa2aa4ff2beac9cf82f

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 00:54:12 -08:00
7bb6a9ed3e
Merge "Deprecate getActiveLinkProperties."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-02-06 08:32:10 +00:00
39d46d221b
Add API for NetworkStack to start captive portal
Endpoints protected with INTERACT_ACROSS_USERS_FULL, such as
startActivityAsUser, should only be used by modules signed with the
platform cert. The NetworkStack needs to have the system server start
the application so this restriction can be applied.

Bug: 123846255
Test: flashed, captive portal works from primary and secondary user
Change-Id: Ib3e427b3fd03ced80c02985e795f79b096a2ec9a

Remi NGUYEN VAN   commited 2019-02-06 16:38:32 +09:00
94ff95bbcd
Deprecate getActiveLinkProperties.
There are other, more idiomatic ways to do this. Deprecating this
with usage limited to P will curb usage and reduce the maintenance
load.
This also deprecates the extra EXTRA_NETWORK_TYPE, which has
survived from an old world but has only been used in deprecated
broadcasts for some time.

Bug: 109783091
Test: eyeball current.txt
Change-Id: I87b74833bb4ec362ee3fd07511a66d318c29067d

Chalard Jean   commited 2019-02-06 15:44:44 +09:00
97021a1eeb
Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1 am: 0b93464e32
am: d6cedf5ed3

Change-Id: I55d7b285a75946713986163fbaa166d4b02513d4

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:41:37 -08:00
a627caa478
Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1
am: 0b93464e32

Change-Id: I695f8a96348b3033bd20a2a9d42ac9ee2bd485ad

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:32:01 -08:00
d6cedf5ed3
[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData
Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I057dde79013b9eda5037b9a44f8eee06cc07352e

junyulai   authored and   Chalard Jean   commited 2019-02-06 14:07:39 +09:00
80d0356311
[KA03] Support tcp keepalive offload
When offload is starting, socket will be switched to repair
mode. Read and write on the socket will not be allowed until
repair mode is turned off. If remote packet arrives, repair
mode will be turned off automatically and a callback will
be raised to indicate that socket is ready to read from.

Bug: 114151147
Test: -atest FrameworksNetTests
      -manual

Change-Id: I0c335865912e183e7ad32a8ea12188f02ccde5fd

markchien   authored and   Chalard Jean   commited 2019-02-06 12:22:22 +09:00
e5591ce2fa
Merge "[KA02] internal cleanup and refactor for SocketKeepalive" am: 292da961e6
am: 839c99be82

Change-Id: I242fdacdd70729367f60da80a1a27d8f5a08dff6

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 10:39:31 -08:00
9a003aaebc
[KA02] internal cleanup and refactor for SocketKeepalive
In previous change, the new SocketKeepalive API was exported.
But internally, old PacketKeepalive names and structures are
still used.

This change rename them properly for code consistency and also
refactor KeepalivePacketData to support different types of
KeepalivePacketData.

Bug: 114151147
Test: 1. atest FrameworksNetTests
      2. atest FrameworksWifiTests
      3. atest FrameworksTelephonyTests

Change-Id: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e
Merged-In: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e

junyulai   authored and   Chalard Jean   commited 2019-02-05 20:13:47 +09:00
011b1f15c2
[KA02] internal cleanup and refactor for SocketKeepalive
In previous change, the new SocketKeepalive API was exported.
But internally, old PacketKeepalive names and structures are
still used.

This change rename them properly for code consistency and also
refactor KeepalivePacketData to support different types of
KeepalivePacketData.

(clean cherry-pick from aosp/860394)

Bug: 114151147
Test: 1. atest FrameworksNetTests
      2. atest FrameworksWifiTests
      3. atest FrameworksTelephonyTests

Change-Id: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e

junyulai   authored and   Chalard Jean   commited 2019-02-04 04:06:22 +00:00
1fb0c95661
Merge changes from topic "bindprocess-resolv" am: af8e41c434 am: 4b8dee1177
am: 301ff56903

Change-Id: I3f35e6719db4a1152281d1143e8756e726d51e64

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-31 00:30:06 -08:00
1cb688eab8
Merge changes from topic "bindprocess-resolv" am: af8e41c434
am: 4b8dee1177

Change-Id: I80f85170981c2f5b1ef949b5db88baf5fc101cd0

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-31 00:19:37 -08:00
301ff56903
Merge "Add get last entitlement value callback API" am: 029be80b79 am: ffe3d99f91
am: 5433fa3269

Change-Id: If67c8d092dd2c40f95cbe423bc694aa349039541

Mark Chien   authored and   android-build-merger   commited 2019-01-30 23:59:01 -08:00
4ebd3aaf1e
Merge changes from topic "bindprocess-resolv"
* changes:
  Allow use of bindProcessToNetwork only to change private DNS bypass.
  Allow bypassing private DNS via bindProcessToNetwork.

Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-31 07:52:04 +00:00
af8e41c434
Merge "Add get last entitlement value callback API" am: 029be80b79
am: ffe3d99f91

Change-Id: I42892bdacaa41f9cea7e653f0bb9b5497192e5f6

Mark Chien   authored and   android-build-merger   commited 2019-01-30 23:49:43 -08:00
5433fa3269
Merge "Add get last entitlement value callback API"
Mark Chien   authored and   Gerrit Code Review   commited 2019-01-31 07:23:31 +00:00
029be80b79
Add get last entitlement value callback API
The callback would be used to notify entitlement value. If the
cache value indicates entitlement succeeded, it just fire
callback with cache value instead of run entitlement check.

Bug: 120887283
Test: atest FrameworksNetTests
Change-Id: I8afe928423bd75c54c61533a50a5c0814922ceb1

markchien   commited 2019-01-31 12:31:55 +08:00
0f45bb9d3d
Allow use of bindProcessToNetwork only to change private DNS bypass.
Currently it is not possible to change private DNS bypass by
doing:

  setProcessDefaultNetwork(network.getPrivateDnsBypassingCopy());
  setProcessDefaultNetwork(network);

because the code will ignore the change. Fix this by ensuring
that we always call bindProcessToNetwork (which does not have
side effects) and then only performing the expensive operations
(flushing DNS cache, upating socket pools) if the netId changed.

Bug: 112869080
Test: None
Change-Id: I5e8999cb11d8b8c1e9eb583fa8b3932f212accff

Lorenzo Colitti   commited 2019-01-31 13:08:24 +09:00
3c766ebc4d
Merge "Nuke old setAlwaysOnVpnPackageForUser method." am: 35a8f1a38a am: bd757b5a3d
am: 2bdb01f0a0

Change-Id: I0ca587378c1db327c4e73b18ab5c1c2505f05ce0

Pavel Grafov   authored and   android-build-merger   commited 2019-01-30 14:50:00 -08:00
97640add4c
Merge "Add SystemApi for captive portal metrics" am: b591097458
am: 3efa288531

Change-Id: I15adc597039539d53e5c08dc5f8cac74bcb0eda2

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-30 14:42:34 -08:00
9002494f06
Merge "Nuke old setAlwaysOnVpnPackageForUser method." am: 35a8f1a38a
am: bd757b5a3d

Change-Id: I7f0de294357ae6c691d38be52dd278eb37d42116

Pavel Grafov   authored and   android-build-merger   commited 2019-01-30 14:36:37 -08:00
2bdb01f0a0
Merge "Add SystemApi for captive portal metrics"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-30 22:24:12 +00:00
b591097458