Commit Graph

5716 Commits

Author SHA1 Message Date
Chalard Jean
7f8be9f6ca [MS09] Implement isSameNetwork.
Test: Old tests pass, new tests pass too.
Bug: 113554482

Change-Id: I420471853f3fab7725cba7ae500cebdce1912e43
2019-01-22 19:10:48 +09:00
Remi NGUYEN VAN
65599b3ca1 Merge "Add NetworkStack metrics to system API"
am: bda2c4fe17

Change-Id: I686e0ffb8d226d9245f1ef6c04bbc8d586c61e81
2019-01-22 00:09:31 -08:00
Remi NGUYEN VAN
109f8d5585 Add LinkProps and NetworkCaps methods to SystemApi
Added methods are used by the NetworkStack.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: I8822d43c1a4981ca39289525685b3f975fb0e8d5
2019-01-22 16:57:16 +09:00
Remi NGUYEN VAN
bda2c4fe17 Merge "Add NetworkStack metrics to system API" 2019-01-22 07:48:39 +00:00
Lorenzo Colitti
2244ef14a8 Merge "Properly expect all callbacks in testStackedLinkProperties."
am: 98dda351ac

Change-Id: Ida7b6da29e46856b504cc5b58afa78404a54cb4e
2019-01-21 22:41:16 -08:00
Lorenzo Colitti
98dda351ac Merge "Properly expect all callbacks in testStackedLinkProperties." 2019-01-22 06:31:23 +00:00
Remi NGUYEN VAN
50cf5400b6 Merge "Add NetworkMonitor constants to SystemApi"
am: a1e4e0bc23

Change-Id: Ic9591f31c6f2b7e613a78fa32311412952be26b8
2019-01-21 19:15:59 -08:00
Remi NGUYEN VAN
a1e4e0bc23 Merge "Add NetworkMonitor constants to SystemApi" 2019-01-22 03:03:37 +00:00
Lorenzo Colitti
4433025623 Properly expect all callbacks in testStackedLinkProperties.
Currently testStackedLinkProperties accounts for some of the
NetworkCallbacks that are fired, but not all of them. The test
passes because it only ever expects LinkProperties changed
callbacks (and not, e.g., lost callbacks), because it uses
waitForIdle(), and because at the end, when the callback is
unregistered, it does not call assertNoCallback().

Add the missing callback expectation and expect a LOST callback
at the end. Also add an assertNoCallback, even though it's not
strictly necessary. Remove all the waitForIdle statements, which
are no longer necessary because every assertion happens after
waiting for a callback.

Making the expectations more precise in a separate CL will help
ensure that upcoming changes to this code don't break anything,
and will make said changes easier to review.

Bug: 65674744
Test: atest FrameworksNetTests
Test: ConnectivityServiceTest#testStackedLinkProperties passes 400 times
Change-Id: I73cda0dd029a0e6546f7272beedf841ce5a4c0dc
2019-01-22 10:53:00 +09:00
Remi NGUYEN VAN
cbd795dff7 Merge "Add fields used by NetworkStack to the API"
am: aa983b7f1c

Change-Id: Iaf2dfea8263a1c7e78130222126e2ebbaa84fedd
2019-01-21 15:36:17 -08:00
Remi NGUYEN VAN
c8bf99d5d9 Add NetworkStack metrics to system API
Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: Ie52c55f248c173e2a5ee603ecd004fbac9004ac1
2019-01-21 23:24:41 +00:00
Remi NGUYEN VAN
aa983b7f1c Merge "Add fields used by NetworkStack to the API" 2019-01-21 23:20:26 +00:00
Chalard Jean
ae62bfc346 Merge changes I2ddfef0c,I49bee0c9
am: 1feafc2e2a

Change-Id: I54b43a6fe240d00d0e530a8777bdb9f452a2b539
2019-01-21 11:01:47 -08:00
Remi NGUYEN VAN
cfa31032d6 Merge "Add stable AIDL parcelables for IIpClient API"
am: 2fd1c3864e

Change-Id: Id3e39ed932161941f953c2f38d1ce9ed0afcc785
2019-01-21 10:56:19 -08:00
Remi NGUYEN VAN
85b9665073 Add fields used by NetworkStack to the API
Test: m
Bug: 112869080
Change-Id: I59f6d5ae8a601b7496548b87f137a577f2365a37
2019-01-21 23:03:25 +09:00
Pavel Grafov
e87b7ceaa6 Add API for VPN apps to query always-on and lockdown.
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Bug: 72628179
Change-Id: I73cb0888f7049b12ab0cdfa62678c3846e074d3b
2019-01-21 13:48:45 +00:00
Remi NGUYEN VAN
70ab67f1ce Add NetworkMonitor constants to SystemApi
NetworkMonitor lives in the NetworkStack which must only use system
APIs. This includes constants used by NetworkMonitor and captive portal
login.

Bug: 112869080
Test: m
Merged-In: I8b5f0bb61c3ef0d2f33af7dd67b72ac6c5a1d1b5
Change-Id: I4879568d3fbf9435767c8d4d0ab5198d421a2f4f
2019-01-21 21:11:15 +09:00
Chalard Jean
1feafc2e2a Merge changes I2ddfef0c,I49bee0c9
* changes:
  [MS08] Read back attributes and blobs.
  [MS07] Implement storeNetworkAttributes and storeBlob.
2019-01-21 09:34:41 +00:00
Remi NGUYEN VAN
2fd1c3864e Merge "Add stable AIDL parcelables for IIpClient API" 2019-01-21 08:01:26 +00:00
Chalard Jean
b8997229ad [MS08] Read back attributes and blobs.
Test: New tests in IpMemoryStore
Bug: 113554482

Change-Id: I2ddfef0c2ed37459c038f75d1dfc92fdefbf58f5
2019-01-21 15:21:09 +09:00
Junyu Lai
e2c006f40b Merge "Remove dead KeepaliveInfo if it cannot be started"
am: 8e1e64f928

Change-Id: I7ec41627065d21d025370905257483738ee04c42
2019-01-20 20:09:51 -08:00
Remi NGUYEN VAN
699aefeb81 Add stable AIDL parcelables for IIpClient API
Test: atest FrameworksNetTests NetworkStackTests
Bug: b/112869080
Change-Id: Ia4ac1eb482850a06c4dc1b6c1fe55d33d4087388
2019-01-21 12:54:24 +09:00
Junyu Lai
8e1e64f928 Merge "Remove dead KeepaliveInfo if it cannot be started" 2019-01-21 03:48:15 +00:00
Josh Gao
39ac4fe5bf Merge "Avoid calling ParcelFileDescriptor.fromSocket on new Sockets."
am: 5ceb563f51

Change-Id: Ib8c818a3038877b87187659b0ff65a9d31b998e7
2019-01-18 14:55:47 -08:00
Josh Gao
5ceb563f51 Merge "Avoid calling ParcelFileDescriptor.fromSocket on new Sockets." 2019-01-18 22:25:35 +00:00
junyulai
8c925d2762 Remove dead KeepaliveInfo if it cannot be started
If KeepaliveInfo was created but cannot be started, current
design will only notify apps but not remove it from local
hashmap, which will cause unexpected behavior if someone
tries to iterate records and fire callbacks.

Bug: 122636283
Test: atest FrameworksNetTests
Change-Id: If4cb25a881dd3555f569c729f88741675f7f3bdf
2019-01-18 21:48:13 +08:00
Etan Cohen
d1ee1a649f Merge "[CS] Add an option to block sensitive network specifier"
am: 895ef965f5

Change-Id: Idedbc2ec564bd1ab65a3bb466ea4f20bb849648f
2019-01-17 21:14:54 -08:00
Etan Cohen
107ae95001 [CS] Add an option to block sensitive network specifier
Network specifiers are used for 2 purposes:

- As part of network requests to specify more information on the type
  of requested networks.
- On network agents to specify information about their networks.

The network specifiers of the requests and agents are matched to each
other. However, the agent network specifier may contain sensitive
information which we do not want forwarded to any app.

This CL adds an option to strip out this agent network specifier before
the network capabilities are forwarded to the app.

Bug: 122160111
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: If08d312ff814bdde1147518f923199e6349503d5
2019-01-17 16:30:05 -08:00
Lorenzo Colitti
4a4e693e3e Merge changes Iec53a9fd,Iac4cfe70
am: 8621e44c39

Change-Id: I8fae2c4d23d6e904b473b1e906094f997c8e446c
2019-01-16 01:42:42 -08:00
Lorenzo Colitti
8621e44c39 Merge changes Iec53a9fd,Iac4cfe70
* changes:
  Test parceling empty LinkProperties.
  Delete the clatd functions from NetworkManagementService.
2019-01-16 09:28:06 +00:00
Remi NGUYEN VAN
bd228f1a83 Merge "Add Nat64Prefix to LinkProperties copy constructor"
am: 786215116c

Change-Id: If0b47f74b9ac1016ab7e72574745e12e525e2555
2019-01-16 00:47:45 -08:00
Remi NGUYEN VAN
786215116c Merge "Add Nat64Prefix to LinkProperties copy constructor" 2019-01-16 08:35:01 +00:00
Remi NGUYEN VAN
8f7bc647b5 Add Nat64Prefix to LinkProperties copy constructor
The attribute is copied when parceling/unparceling so should also be
preserved in the copy constructor.

Test: tests based on this pass
Change-Id: Ia48d94fc075e6414f537dad181a236be5a32b41b
2019-01-16 15:27:27 +09:00
Lorenzo Colitti
6b39032761 Merge "Add the NAT64 prefix to LinkProperties."
am: 983e77db4a

Change-Id: Ia1e6e1e584db12e57b245fa01651d289337906a3
2019-01-14 20:17:53 -08:00
Lorenzo Colitti
1d3bf3d90c Test parceling empty LinkProperties.
Test: atest FrameworksNetTests
Change-Id: Iec53a9fdce1ba1db86751ea5f14a11d28be543eb
2019-01-15 12:53:59 +09:00
Lorenzo Colitti
ae53ea1874 Delete the clatd functions from NetworkManagementService.
Make Nat464Xlat talk to netd directly instead of through
NetworkManagementService. The methods in NetworkmanagementService
don't really provide any value: since the only thing they do is
call into netd, we might as well have the callers talk to netd
directly,

In order to do this, pass INetworkManagementService and INetd to
the NetworkAgentInfo constructor, and update callers appropriately.

Bug: 65674744
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: Iac4cfe709c6279e4d9682b6754963e533707bd12
2019-01-15 11:13:07 +09:00
Lorenzo Colitti
981b34f6b8 Add the NAT64 prefix to LinkProperties.
Currently we support exactly one NAT64 prefix. This matches what
other components in the system (Dns64Configuration, clatd, etc.)
support.

Test: atest FrameworksNetTests
Change-Id: I45a11cebe43a5e1c60d50eca7889cb317565b598
2019-01-12 02:16:34 +09:00
Chalard Jean
946d156bce Merge changes from topic "IPMS1"
am: 3627deac88

Change-Id: I80fc9437a041de68ce16ae5e85189b5d48fe1c97
2019-01-11 03:44:45 -08:00
Chalard Jean
6dd2486300 [MS02] Write the skeleton for the IP memory store.
This implements a minimal contract for the IP Memory Store
feature.

Test: Created new tests for parcelable code. For the rest, created
      empty tests, but there is no logic, it's boilerplate day
Bug: 116512211
Change-Id: I15dc6275b370d671385ddfdb058a8b8d39952d6e
2019-01-11 15:01:00 +09:00
Chalard Jean
d3829de504 [MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0
2019-01-11 15:00:36 +09:00
Remi NGUYEN VAN
8255355c7d Merge "Move NetworkMonitor to NetworkStack"
am: b35979db6b

Change-Id: If5c2c104bc53a565e89e625b1edce0b976a295f3
2019-01-10 21:15:28 -08:00
Remi NGUYEN VAN
b35979db6b Merge "Move NetworkMonitor to NetworkStack" 2019-01-11 05:08:52 +00:00
Remi NGUYEN VAN
8539129ad9 Move NetworkMonitor to NetworkStack
Bug: b/112869080
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I1b8b6a3f4390adbabf92fb9e48da61c47b08b2ec
2019-01-11 09:59:11 +09:00
Chalard Jean
aad967ed2a Merge "Add PCSCF to LinkProperties."
am: a99e1eeb9d

Change-Id: Ia153067765ea39430f4dfbc49da3cbd92054b8a9
2019-01-09 22:06:46 -08:00
Chalard Jean
a99e1eeb9d Merge "Add PCSCF to LinkProperties." 2019-01-10 05:55:05 +00:00
Remi NGUYEN VAN
0217604bd3 Merge "Move DhcpServer to NetworkStack app"
am: 82ef768e0c

Change-Id: I5ed78d8b4b9fc5bc8f50bfa77d60e19bd3815a6d
2019-01-09 02:53:48 -08:00
Remi NGUYEN VAN
82ef768e0c Merge "Move DhcpServer to NetworkStack app" 2019-01-09 10:42:48 +00:00
Remi NGUYEN VAN
a35360c1b6 Move DhcpServer to NetworkStack app
Test: atest FrameworksNetTests && atest NetworkStackTests
Bug: b/112869080

Change-Id: I96c40e63e9ceb37b67705bdd4d120307e114715b
2019-01-09 15:42:16 +09:00
Chalard Jean
85188cead6 Merge "Add nullability annotations to public methods of ConnManager."
am: 805e2ad9db

Change-Id: I8f5cc35869b4b76404190709206cccd895a1d4b4
2019-01-08 00:10:38 -08:00
Chalard Jean
158702db55 Add nullability annotations to public methods of ConnManager.
This is mainly for Kotlin compatibility.
https://android-developers.googleblog.com/2018/08/android-pie-sdk-is-now-more-kotlin.html

Bug: 122437895
Test: no logic changes
Change-Id: Ic1b9a774aee0099397b1ccfd958ff3b61d69a7fb
2019-01-07 19:35:09 +09:00