Commit Graph

1553 Commits

Author SHA1 Message Date
Lucas Lin
79309b59af Merge "Check if network has partial connectivity" am: e54e1235e6 am: 9ebfc37ff9
am: 8a7575af75

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9
2019-03-12 01:47:25 -07:00
lucaslin
25a5047d2c Check if network has partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Test: 1. Build pass.
      2. Fake partial connectivity case for testing.
      3. atest FrameworksNetTests
      4. atest NetworkStackTests

Change-Id: I69ed00ac4850904ff708c9fef22e148879a10e92
2019-03-12 07:37:33 +00:00
Junyu Lai
6a944483f8 Merge "Improve keepalive offload documentation and error handling" am: 43b275b281 am: 8896c4a4f5
am: af523a54e4

Change-Id: If13af1a50c9bb12c85559c9c7a83d0e861d76d09
2019-03-11 22:40:00 -07:00
Junyu Lai
43b275b281 Merge "Improve keepalive offload documentation and error handling" 2019-03-12 05:11:50 +00:00
Luke Huang
17fb1ae03e Merge "Minor changes to the async DNS query JAVA API" am: e11e530257 am: 67de0767d9
am: 0882684893

Change-Id: I5ce24db3888c9ac4e05af254aa99aae3abcb7140
2019-03-09 04:33:13 -08:00
Benedict Wong
eb8cf2cb1d resolve merge conflicts of 40f59e9f2d 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
a005c999b2 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
0a6eaab280 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
e11e530257 Merge "Minor changes to the async DNS query JAVA API" 2019-03-08 03:19:55 +00:00
Benedict Wong
9c34c48e96 Merge changes Ie66ba631,Ic42c09a3
* changes:
  Implement TestNetworkService
  Add shell TestNetworkManager and Service
2019-03-07 23:32:55 +00:00
Mark Chien
0bdfaa802b Merge "Fix TetheringEntitlementValueListener related API" am: e2f15a176f am: 4ccb25bfa3
am: e432b14e7a

Change-Id: I9a1f7c9fa34b6f1e6104a8e5af4b6957e7aae3eb
2019-03-07 05:51:10 -08:00
Mark Chien
e2f15a176f Merge "Fix TetheringEntitlementValueListener related API" 2019-03-07 13:21:53 +00:00
Luke Huang
e083ed951f 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
a0229cbac6 Improve keepalive offload documentation and error handling
Bug: 123987401
Test: atest FrameworksNetTests
Change-Id: Id651cfb743f02b05ca3845af3c393eaf5762bb20
2019-03-07 16:01:30 +08:00
markchien
dd41c82056 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
298325342e Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 17:18:05 +00:00
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
Benedict Wong
e540476ad4 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
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
Andrei Onea
c9eba344b9 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
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