Commit Graph

1535 Commits

Author SHA1 Message Date
Amit Mahajan
ec9e7a07e9 Merge "Adding new APN type for Mission Critical Services." am: c4d867c5e3 am: 819aaec930
am: 508c836dd5

Change-Id: Iaa216ae164b1bbc1c27be0549bd9e19fa9803cb8
2019-03-04 11:10:07 -08:00
Amit Mahajan
c4d867c5e3 Merge "Adding new APN type for Mission Critical Services." 2019-03-04 18:23:30 +00:00
Jack Yu
11db51010c Merge "Fixed all APIs not meeting API review requirement" am: a4c326157c am: 48ed523a6d
am: 93991029c5

Change-Id: I9683c9616e524013eda818e34d817d636ff1f365
2019-03-02 20:59:32 -08:00
Treehugger Robot
a4c326157c Merge "Fixed all APIs not meeting API review requirement" 2019-03-03 04:27:32 +00:00
Jeff Vander Stoep
6094312256 Merge "getConnectionOwnerUid: Clarify documentation" am: 1a4ffd5df1 am: 579402391a
am: 0b9ba97454

Change-Id: I4861a830f974d542452fb1ea8710438cf4fec14a
2019-03-01 20:24:38 -08:00
Treehugger Robot
1a4ffd5df1 Merge "getConnectionOwnerUid: Clarify documentation" 2019-03-02 03:42:22 +00:00
Paul Duffin
935a1c5dd9 Merge "Fix Automated API Review: InetAddresses" am: 4daca39083 am: 1c0dc70654
am: e137413db2

Change-Id: I20a88429cd47bf16d7b2766fde5b978c33e9272b
2019-03-01 19:35:02 -08:00
Amit Mahajan
44f8255974 Adding new APN type for Mission Critical Services.
Test: build
Bug: 124447962
Change-Id: I9f608badd363703394432640dc892a4465660b6d
2019-03-01 16:52:17 -08:00
Jack Yu
3ee7ba172e Fixed all APIs not meeting API review requirement
To address the API review feedback provided by
the API council.

Bug: 126702995
Bug: 126701710
Bug: 126702357
Bug: 126701113
Bug: 126701239
Bug: 126700713
Bug: 126700064
Test: Manual
Change-Id: I4b902c1fc2c09133022b05dacdda8964436205d2
2019-03-01 14:37:47 -08:00
Paul Duffin
3b6665ecac Fix Automated API Review: InetAddresses
Add @NonNull annotations as required by the automated review.

Bug: 126702338
Test: make checkbuild
Change-Id: I9057f06de8d7ea846af00d5cefa744d4206b4b63
2019-03-01 14:06:18 +00:00
Jeff Sharkey
9286f91971 All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Varun Anand
65a199273f Merge "Remove ConnectivityManager and its usages from NetworkStatsService." 2019-03-01 01:14:34 +00:00
Varun Anand
5e980f4e3d 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: Id1da446b54d95ee68ed14079107b1a10318bcf8b
Merged-In: I57e117bb4e9efe491b19d6b5a479f2d58d1c58e6
2019-03-01 00:10:52 +00:00
Varun Anand
65d59a826f 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
2019-02-28 13:43:02 -08:00
Chiachang Wang
266ab95fe6 Merge "Fix broken javadoc links" am: e239dc818c am: ba54027efe
am: 4bc3afb4c8

Change-Id: Iffb9cfe0928ed37db61a7f684acb2b41b74c1bfa
2019-02-28 06:05:10 -08:00
Jeff Vander Stoep
96c64edbd9 getConnectionOwnerUid: Clarify documentation
Test: build
Bug: 117573763
Change-Id: Ia899a541987b9c72a83287ed69fc47ab4d38f680
2019-02-27 13:37:37 -08:00
Andrei Onea
734999cff8 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
2019-02-27 13:31:33 +00:00
Chiachang Wang
0d92d1a79c Fix broken javadoc links
Bug: 123683994
Test: Verify with javadoc
Change-Id: I4b1b936e3cf86104ace5fcb6829778710801f2d5
2019-02-27 17:18:40 +08:00
Etan Cohen
934718ad61 Merge "[CS] Support "instant failure" from factories" 2019-02-22 14:29:39 +00:00
Remi NGUYEN VAN
50746281b1 Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: ca55fb73c7

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f
2019-02-15 00:26:34 -08:00
Remi NGUYEN VAN
ca55fb73c7 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Remi NGUYEN VAN
fc40b408d5 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 05:39:14 +00:00
Remi NGUYEN VAN
89fbdc360d 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
2019-02-15 12:20:03 +09:00
Xin Li
7687edd138 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:32 +00:00
Benedict Wong
5d66b45e94 Merge "Add Test Network and Transport types" am: df27f67993 am: 3a7e4f86ae
am: 61e8e7a054

Change-Id: Ia9c100ebeb8b54e743820b74ff35d006919e9fbb
2019-02-14 11:08:57 -08:00
Benedict Wong
61e8e7a054 Merge "Add Test Network and Transport types" am: df27f67993
am: 3a7e4f86ae

Change-Id: I371a4f3bdbbfd001e9694e29843b6b7119b938b0
2019-02-14 10:59:02 -08:00
Xin Li
4bf096e345 DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Remi NGUYEN VAN
b68d1465ec 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
2019-02-14 20:36:40 +09:00
Etan Cohen
2efc554d92 [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
2019-02-13 08:44:51 -08:00
Benedict Wong
8015602ac9 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
2019-02-11 12:57:43 -08:00
Remi NGUYEN VAN
c4e7c31749 Merge "Add API for NetworkStack to start captive portal" am: 26b11cdf44 am: 14b3b4bebc
am: 05c324d60a

Change-Id: I54a32dd01f1f697fc7da703bc1d258ed6a43df23
2019-02-06 19:08:29 -08:00
Remi NGUYEN VAN
05c324d60a Merge "Add API for NetworkStack to start captive portal" am: 26b11cdf44
am: 14b3b4bebc

Change-Id: Ie428acbfce0f94f0bade67258fefbb3253a539df
2019-02-06 18:58:57 -08:00
Remi NGUYEN VAN
26b11cdf44 Merge "Add API for NetworkStack to start captive portal" 2019-02-07 02:39:17 +00:00
Chalard Jean
7de6676378 Merge "[KA04] Expose TCP socket keepalive API" am: 68230eff94 am: d85bb7f373
am: d13c48d256

Change-Id: I490acd417b3f70ba1dec3bbf9f049088b849c782
2019-02-06 07:41:19 -08:00
Chalard Jean
d13c48d256 Merge "[KA04] Expose TCP socket keepalive API" am: 68230eff94
am: d85bb7f373

Change-Id: Ia5c108bfa42ab0de9d4cdf676c5980dc9a9aba12
2019-02-06 07:31:44 -08:00
junyulai
c7ea1242ea [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
2019-02-06 22:51:42 +09:00
Chalard Jean
80471e1fb5 Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: cbd07b88ab am: f5805a6b5c
am: e8bba9c7d1

Change-Id: I700550160c795becb4c3e37a88328488846d272f
2019-02-06 01:47:49 -08:00
Chalard Jean
e8bba9c7d1 Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: cbd07b88ab
am: f5805a6b5c

Change-Id: I3b0645585140d8ee12f896946a2a1fbb519e6195
2019-02-06 01:38:31 -08:00
Chalard Jean
cbd07b88ab Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" 2019-02-06 09:19:07 +00:00
Chalard Jean
6086acf462 Merge "Deprecate getActiveLinkProperties." am: e429dfd104 am: 69a894623b
am: dbe36dc5cf

Change-Id: I364a5420ab6552f652fa40a6607af249f92770c6
2019-02-06 01:03:25 -08:00
Chalard Jean
dbe36dc5cf Merge "Deprecate getActiveLinkProperties." am: e429dfd104
am: 69a894623b

Change-Id: Iab302f94c8b33373831e1aa2aa4ff2beac9cf82f
2019-02-06 00:54:12 -08:00
Treehugger Robot
e429dfd104 Merge "Deprecate getActiveLinkProperties." 2019-02-06 08:32:10 +00:00
Remi NGUYEN VAN
f363f5f366 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
2019-02-06 16:38:32 +09:00
Chalard Jean
cc47b52a9c 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
2019-02-06 15:44:44 +09:00
Chalard Jean
a707d25603 Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1 am: 0bebdf2e1e
am: 020998a27b

Change-Id: I55d7b285a75946713986163fbaa166d4b02513d4
2019-02-05 22:41:37 -08:00
Chalard Jean
020998a27b Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1
am: 0bebdf2e1e

Change-Id: I695f8a96348b3033bd20a2a9d42ac9ee2bd485ad
2019-02-05 22:32:01 -08:00
junyulai
8c1586e956 [KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData
Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I057dde79013b9eda5037b9a44f8eee06cc07352e
2019-02-06 14:07:39 +09:00
markchien
46f41d4b16 [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
2019-02-06 12:22:22 +09:00
Chalard Jean
cba6514494 Merge "[KA02] internal cleanup and refactor for SocketKeepalive" am: 292da961e6
am: 3527414d22

Change-Id: I242fdacdd70729367f60da80a1a27d8f5a08dff6
2019-02-05 10:39:31 -08:00
junyulai
21c06d06ce [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
2019-02-05 20:13:47 +09:00