Commit Graph

1902 Commits

Author SHA1 Message Date
Junyu Lai
16f5c7d596 Merge "Improve keepalive offload documentation and error handling" am: a0b880c9e8 am: 4a91c73e67
am: a820236f47

Change-Id: If13af1a50c9bb12c85559c9c7a83d0e861d76d09
2019-03-11 22:40:00 -07:00
Junyu Lai
a0b880c9e8 Merge "Improve keepalive offload documentation and error handling" 2019-03-12 05:11:50 +00:00
Etan Cohen
fbfdd84e7c [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
Merged-In: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5
Change-Id: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5
2019-03-11 16:15:43 -07:00
Luke Huang
a3acfe29a9 Merge "Minor changes to the async DNS query JAVA API" am: 06ef4a5bc4 am: 39c58a32d3
am: 6005667ec0

Change-Id: I5ce24db3888c9ac4e05af254aa99aae3abcb7140
2019-03-09 04:33:13 -08:00
Benedict Wong
17ab80fd9d resolve merge conflicts of 7365441fe3 to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia76e345ddda5972b2c00731cd1d73a2c1d41c1db
2019-03-08 23:45:49 +00:00
markchien
4ef53e8819 Add tethering event callback API
Provide OnTetheringEventCallback for system app to know
tethering's upstream.

Bug: 125583822
Test: -build, flash, boot
      -atest FrameworksNetTests

Change-Id: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36
Merged-in: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36
2019-03-09 00:35:55 +08:00
markchien
20f6eea87c Add tethering event callback API
Provide OnTetheringEventCallback for system app to know
tethering's upstream.

Bug: 125583822
Test: -build, flash, boot
      -atest FrameworksNetTests

Change-Id: I7ca81b27c9b805cc01884509f5b20d9d0a24cd36
2019-03-08 17:28:33 +08:00
Luke Huang
06ef4a5bc4 Merge "Minor changes to the async DNS query JAVA API" 2019-03-08 03:19:55 +00:00
Benedict Wong
6525e97ea5 Merge changes Ie66ba631,Ic42c09a3
* changes:
  Implement TestNetworkService
  Add shell TestNetworkManager and Service
2019-03-07 23:32:55 +00:00
Mark Chien
f8279fdf25 Merge "Fix TetheringEntitlementValueListener related API" am: cdfb2b941d am: 71894fbf14
am: ae8e49de86

Change-Id: I9a1f7c9fa34b6f1e6104a8e5af4b6957e7aae3eb
2019-03-07 05:51:10 -08:00
Mark Chien
cdfb2b941d Merge "Fix TetheringEntitlementValueListener related API" 2019-03-07 13:21:53 +00:00
Luke Huang
1244835690 Minor changes to the async DNS query JAVA API
1. refine the naming in DnsPacket and add more comment
2. add comment in DnsResolver

Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Ib482d079d6823fd1d9bff163427b7aad38374199
2019-03-07 16:40:49 +08:00
junyulai
97767bf71c Improve keepalive offload documentation and error handling
Bug: 123987401
Test: atest FrameworksNetTests
Change-Id: Id651cfb743f02b05ca3845af3c393eaf5762bb20
2019-03-07 16:01:30 +08:00
markchien
bf5ab01869 Fix TetheringEntitlementValueListener related API
Test: -build, flash, boot
      -atest FrameworksNetTests
bug: 126701557
bug: 126392011

Change-Id: I6dda10fbfe8ffaef71269617750a22563396f5ea
2019-03-07 13:33:21 +08:00
Andrei-Valentin Onea
7e3ccaa77a Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 17:18:05 +00:00
Amit Mahajan
2de8d9415a Merge "Adding new APN type for Mission Critical Services." am: a32315e69a am: 65bde4b9a0
am: 45f927af1e

Change-Id: Iaa216ae164b1bbc1c27be0549bd9e19fa9803cb8
2019-03-04 11:10:07 -08:00
Amit Mahajan
a32315e69a Merge "Adding new APN type for Mission Critical Services." 2019-03-04 18:23:30 +00:00
Jack Yu
0b5569af6f Merge "Fixed all APIs not meeting API review requirement" am: 37cde6b81d am: 75d5f94bb5
am: 2313596576

Change-Id: I9683c9616e524013eda818e34d817d636ff1f365
2019-03-02 20:59:32 -08:00
Treehugger Robot
37cde6b81d Merge "Fixed all APIs not meeting API review requirement" 2019-03-03 04:27:32 +00:00
Jeff Vander Stoep
879c396fec Merge "getConnectionOwnerUid: Clarify documentation" am: 72a6706e8b am: 563f40fb7f
am: f26bffe73f

Change-Id: I4861a830f974d542452fb1ea8710438cf4fec14a
2019-03-01 20:24:38 -08:00
Treehugger Robot
72a6706e8b Merge "getConnectionOwnerUid: Clarify documentation" 2019-03-02 03:42:22 +00:00
Paul Duffin
22b9062704 Merge "Fix Automated API Review: InetAddresses" am: 4daca39083 am: cd8d86ab93
am: 0be0a4138e

Change-Id: I20a88429cd47bf16d7b2766fde5b978c33e9272b
2019-03-01 19:35:02 -08:00
Amit Mahajan
b7aafd26aa 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
9fc82e3a86 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
e59e8c6255 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
f8525286b4 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
Benedict Wong
a4ca3c6312 Add shell TestNetworkManager and Service
This adds the scaffolding for TestNetworkManager and TestNetworkService.
These are separate from the ConnectivityManager/ConnectivityService in
order to prevent polluting the API space, and making them harder to
maintain.

Bug: 72950854
Test: Compiles, CTS tests relying on this pass
Change-Id: Ic42c09a33d962471e2587ec27f3fab2d72bbcd42
2019-02-28 21:46:58 -08:00
Varun Anand
c839241101 Merge "Remove ConnectivityManager and its usages from NetworkStatsService." 2019-03-01 01:14:34 +00:00
Varun Anand
f3fd8dd454 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
45406bff69 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
Andrei Onea
23393e21ec 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
Merged-In: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
Change-Id: I16570aef456b45a5543bf889dddc7a0d25441928
2019-02-28 14:39:20 +00:00
Chiachang Wang
f255780123 Merge "Fix broken javadoc links" am: 1dd83b17a9 am: 83fa25b925
am: 5e1d1a5252

Change-Id: Iffb9cfe0928ed37db61a7f684acb2b41b74c1bfa
2019-02-28 06:05:10 -08:00
Jeff Vander Stoep
440df92ff3 getConnectionOwnerUid: Clarify documentation
Test: build
Bug: 117573763
Change-Id: Ia899a541987b9c72a83287ed69fc47ab4d38f680
2019-02-27 13:37:37 -08:00
Andrei Onea
bb27866cfb 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
3b723c2ee8 Fix broken javadoc links
Bug: 123683994
Test: Verify with javadoc
Change-Id: I4b1b936e3cf86104ace5fcb6829778710801f2d5
2019-02-27 17:18:40 +08:00
Etan Cohen
bd51b3057a Merge "[CS] Support "instant failure" from factories" 2019-02-22 14:29:39 +00:00
Remi NGUYEN VAN
48eaae51e3 Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: 399be8f9b9

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f
2019-02-15 00:26:34 -08:00
Remi NGUYEN VAN
399be8f9b9 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Remi NGUYEN VAN
2438b45092 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 05:39:14 +00:00
Remi NGUYEN VAN
eab0f54735 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
4198f09aa7 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
4e34100090 Merge "Add Test Network and Transport types" am: 9a5d3ba1ad am: 9dd06ba6a9
am: b6848e1c03

Change-Id: Ia9c100ebeb8b54e743820b74ff35d006919e9fbb
2019-02-14 11:08:57 -08:00
Benedict Wong
b6848e1c03 Merge "Add Test Network and Transport types" am: 9a5d3ba1ad
am: 9dd06ba6a9

Change-Id: I371a4f3bdbbfd001e9694e29843b6b7119b938b0
2019-02-14 10:59:02 -08:00
Xin Li
472cc5b849 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
ad9f6d89f6 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
4ad1b9f839 [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
bdfaa48ced 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
f7bdf02a86 Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66 am: 640909fadf
am: d98c01d468

Change-Id: I54a32dd01f1f697fc7da703bc1d258ed6a43df23
2019-02-06 19:08:29 -08:00
Remi NGUYEN VAN
d98c01d468 Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66
am: 640909fadf

Change-Id: Ie428acbfce0f94f0bade67258fefbb3253a539df
2019-02-06 18:58:57 -08:00
Remi NGUYEN VAN
9d0e114e66 Merge "Add API for NetworkStack to start captive portal" 2019-02-07 02:39:17 +00:00