Commit Graph

3828 Commits

Author SHA1 Message Date
Chalard Jean
5d8b7c875d Add a static to get the Ip Memory Store
This is so that there is some AOSP stable API while the
memory store is moved to the network.

Test: atest FrameworksNetTests
Change-Id: Ib51dbee77fcb0d14a5c85240ac711b3b1aa71286
2019-03-11 20:48:08 +09:00
Treehugger Robot
8e8ed1dfc2 Merge "Make ParseException less useless." 2019-03-11 04:06:48 +00:00
Bernie Innocenti
e5e3ac639b Merge "Add junyulai@ as owner of the core networking dirs" 2019-03-08 15:21:01 +00:00
Bernie Innocenti
ea89cf2c6e Add junyulai@ as owner of the core networking dirs
Also removed emeritus accounts ek@ and silberst@ from various places.
A cleanup using 'include' would probably be in order...

Test: N/A
Change-Id: I575e60dd5e600e42d9571ce8e8d7661d30e99bfe
2019-03-08 13:04:05 +00:00
Chalard Jean
bb1299cc18 Make ParseException less useless.
Test: None
Change-Id: I4b6d3fc8aba5a602ac06c958db41157cd98f2aff
2019-03-08 17:58:00 +09:00
Luke Huang
c8dfb72891 Merge "Minor changes to the async DNS query JAVA API" 2019-03-08 03:19:55 +00:00
Benedict Wong
cbc409986d Merge changes Ie66ba631,Ic42c09a3
* changes:
  Implement TestNetworkService
  Add shell TestNetworkManager and Service
2019-03-07 23:32:55 +00:00
Mark Chien
fbcc63d51f Merge "Fix TetheringEntitlementValueListener related API" 2019-03-07 13:21:53 +00:00
Luke Huang
33bfef3b54 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
markchien
9554abf9ed 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
Remi NGUYEN VAN
3da7809ae4 Merge "Fix SocketUtils API" 2019-03-07 03:54:22 +00:00
Andrei-Valentin Onea
cf03906edc Merge "Add @UnsupportedAppUsage annotations" 2019-03-06 17:18:05 +00:00
Remi NGUYEN VAN
b7bda39d90 Fix SocketUtils API
- connect, sendTo, bind were added as public API, so do not need to be
   maintained as SystemApi in SocketUtils. These APIs were added in Q
   timeframe.
 - Add @Nullable/@NonNull annotations.

Bug: 126699304
Bug: 126477266
Test: booted, WiFi works
Change-Id: I3f086ac8952cfd6a4d8f861d2e1c7aa1ca8be999
2019-03-06 18:02:34 +09:00
Amit Mahajan
36791ef41e Merge "Adding new APN type for Mission Critical Services." 2019-03-04 18:23:30 +00:00
Treehugger Robot
70c0efdd86 Merge "Add @Nullable to new method" 2019-03-04 11:43:48 +00:00
Treehugger Robot
a3f1b3f15d Merge "Fixed all APIs not meeting API review requirement" 2019-03-03 04:27:32 +00:00
Treehugger Robot
63f516d1ee Merge "getConnectionOwnerUid: Clarify documentation" 2019-03-02 03:42:22 +00:00
Treehugger Robot
1957b624ab Merge "Add @NonNull and @Nullable annotations to VpnService#Builder." 2019-03-02 03:41:57 +00:00
Treehugger Robot
4daca39083 Merge "Fix Automated API Review: InetAddresses" 2019-03-02 03:05:18 +00:00
Amit Mahajan
fd3ee5783e 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
8eb6ca8354 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
Varun Anand
6e81d01e91 Add @NonNull and @Nullable annotations to VpnService#Builder.
Bug: 126699070
Test: n/a
Change-Id: Ief0066636ca6ae4fefbdf70b8dfdfacf2a44e0e6
2019-03-01 11:06:47 -08:00
Dongwon Kang
948d11ffa6 Merge "Make Uri.toSafeString() also handle 'rtsp'" 2019-03-01 17:09:29 +00:00
Adam Vartanian
882eb1867c Add @Nullable to new method
Add @Nullable to a newly-added method, as requested by API council.

Bug: 126698875
Test: make
Change-Id: I2e72ea457b5adaceea70d9908bb8e2cac2e0d963
2019-03-01 15:07:06 +00:00
Paul Duffin
fe38d35ba7 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
Benedict Wong
e40eab608a 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
eunyoung.moon
9c0038ebd3 Make Uri.toSafeString() also handle 'rtsp'
Bug: 123669012
Test: atest CtsNetTestCases:android.net.cts.UriTest
Change-Id: I082bdbd55589f6b99a8cf5fc68c897477f2fa792
Signed-off-by: Eunyoung Moon <eunyoung.moon@lge.com>
2019-02-28 16:53:40 -08:00
Varun Anand
d33cbc6f5f 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
Andrei Onea
efd37eff41 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
Treehugger Robot
5eae14aa54 Merge "Fix broken javadoc links" 2019-02-28 13:34:52 +00:00
Jeff Vander Stoep
b58d3fea26 getConnectionOwnerUid: Clarify documentation
Test: build
Bug: 117573763
Change-Id: Ia899a541987b9c72a83287ed69fc47ab4d38f680
2019-02-27 13:37:37 -08:00
Chiachang Wang
90882258ed Fix broken javadoc links
Bug: 123683994
Test: Verify with javadoc
Change-Id: I4b1b936e3cf86104ace5fcb6829778710801f2d5
2019-02-27 17:18:40 +08:00
Treehugger Robot
1b9adbfdd1 Merge "Use public APIs instead of Conscrypt ones" 2019-02-27 09:01:03 +00:00
Irina Dumitrescu
5155a2d7e4 Add @NonNull annotation to set proxy on VPN parameter.
Test: manual
Bug: 124883120
Change-Id: Ifb4bd98a69a006220b1a824033395fc6f12ea6ce
2019-02-27 01:06:00 +00:00
Adam Vartanian
19254043ae Use public APIs instead of Conscrypt ones
Use the equivalent public APIs on SSLContext instead of reaching into
OpenSSLContextImpl, except for the one place where a
Conscrypt-specific API is needed.

Bug: 123738844
Bug: 119752589
Test: cts -m CtsLibcoreTestCases
Test: atest android.net.SSLCertificateSocketFactoryTest
Change-Id: I61aebac4ad713b8ce53a47e72def0c537b4ab1c9
2019-02-26 09:28:35 +00:00
Chiachang Wang
95489ca49e Add more test case and some clean up
Bug: 120452078
Test: atest NetworkStackTests
Change-Id: Ifb981ccdaa7818bf2bebec98e91979007222910b
2019-02-26 11:32:18 +08:00
Remi NGUYEN VAN
2d7e53ca90 Merge "Fix framework and NetworkStack classes conflicts"
am: 3f23efdd13

Change-Id: I8c207040c42a3d02b8383e13a4f839c250788f58
2019-02-15 16:38:52 -08:00
Remi NGUYEN VAN
3f23efdd13 Merge "Fix framework and NetworkStack classes conflicts" 2019-02-16 00:22:29 +00:00
Remi NGUYEN VAN
51490ad0fa Merge "Move NetworkStack to services.net"
am: 762f9f0c24

Change-Id: Iab45985aedb8069ad50fd2913ef6e828989cdd0d
2019-02-15 03:01:11 -08:00
Remi NGUYEN VAN
762f9f0c24 Merge "Move NetworkStack to services.net" 2019-02-15 10:52:03 +00:00
Remi NGUYEN VAN
1b57e8e9db Fix framework and NetworkStack classes conflicts
Classes that are used in framework.jar cannot be linked in NetworkStack,
as the framework takes precedence in the classpath. This prevents the
networkstack from using these classes due to the hidden API usage
detection.

Do the following:
 - jarjar any shared source file between framework and NetworkStack, so
   the version in the NetworkStack uses a different package.
 - Move any shared class not used in the NetworkStack to services.net

The CL  uses jarjar on the app copy and not the framework classes, as
the framework cannot be updated without an OTA, and non-network stack
specific classes should not be renamed because of the network stack.

Test: atest FrameworksNetTests NetworkStackTests
Test: flashed svelte build, WiFi works
Bug: 124033493
Change-Id: I85d888b756adc28c36638913632bfdfdbf0e0486
2019-02-15 17:30:07 +09:00
Remi NGUYEN VAN
8a4908c1ab Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: bfe928d593

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f
2019-02-15 00:26:34 -08:00
Remi NGUYEN VAN
bfe928d593 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Remi NGUYEN VAN
ddd14b357d Merge "Remove deps from framework on netd interfaces"
am: d36e3df7b0

Change-Id: I341533244d9c7cd2c1cf8315f0806695310ba03c
2019-02-14 19:29:49 -08:00
Remi NGUYEN VAN
5db454c28d Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib1d08a3669983640119d008db7e2990fa798724f
Merged-In: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-15 12:20:17 +09:00
Remi NGUYEN VAN
cfff01e2db 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
Remi NGUYEN VAN
d36e3df7b0 Merge "Remove deps from framework on netd interfaces" 2019-02-15 03:11:31 +00:00
Xin Li
07ec9dbec5 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
0dddb902ae Merge "Add Test Network and Transport types" 2019-02-14 18:37:04 +00:00
Xin Li
0e71b4f19b 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