Commit Graph

3765 Commits

Author SHA1 Message Date
Adrian Roos
e77ff79fdb Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" 2018-12-12 13:43:34 +00:00
Etan Cohen
3c2a2034e4 Merge "[CM] Fix comments, add tests to TransportInfo API" am: 4060bc1480 am: e603fe8bc0
am: d548b6e050

Change-Id: I0a81b7b48bb02da202dd7feaa1440801b794ce67
2018-12-11 22:22:36 -08:00
Etan Cohen
d548b6e050 Merge "[CM] Fix comments, add tests to TransportInfo API" am: 4060bc1480
am: e603fe8bc0

Change-Id: I54556ea99992fbc0105bc2012c3d423e88c60764
2018-12-11 22:09:54 -08:00
Etan Cohen
e603fe8bc0 Merge "[CM] Fix comments, add tests to TransportInfo API"
am: 4060bc1480

Change-Id: Idd668efdd1fe65754228041f23f3a91148aa38d6
2018-12-11 21:54:25 -08:00
Etan Cohen
bd648ce246 [CM] Fix comments, add tests to TransportInfo API
Bug: 117605977
Test: atest NetworkCapabilitiesTest
Change-Id: I734ec56e44cd09d11ae81a856a53a26e1191b9a0
2018-12-11 15:00:10 -08:00
Adrian Roos
66f859135b API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
Xin Li
75f75c18cc DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Ivan Chiang
451db48526 Merge "Expose Uri toSafeString api" am: 17f9b9bfb6 am: 1be68938eb
am: ba104e77e4

Change-Id: I94f7270c90f16254d985a90264aa868005667e07
2018-12-10 07:28:09 -08:00
Ivan Chiang
ba104e77e4 Merge "Expose Uri toSafeString api" am: 17f9b9bfb6
am: 1be68938eb

Change-Id: I9f5de6c9685ee3b9cb75369a8465c154bdbc39f5
2018-12-10 07:13:02 -08:00
Ivan Chiang
17f9b9bfb6 Merge "Expose Uri toSafeString api" 2018-12-10 14:32:36 +00:00
Junyu Lai
71c9bea9a8 Merge "Refactoring of deleting stats in NetworkStats based on uids." am: 0882543a12 am: 9867b60f39
am: c92749ad72

Change-Id: I29c57276424464afd54e184c369d30a5e9707f14
2018-12-10 03:10:15 -08:00
Etan Cohen
4bbe8cc1af Merge "[CS] Add a generic transport-specific information API" am: 7f50b11c89 am: 14062aa659
am: 79cee813c9

Change-Id: I47e0a7d62434b05d4692f9835af93c3a5dd61027
2018-12-10 02:39:46 -08:00
Junyu Lai
c92749ad72 Merge "Refactoring of deleting stats in NetworkStats based on uids." am: 0882543a12
am: 9867b60f39

Change-Id: Icfe86f71f9416dcd5fcc9aafd8c346197cde7cff
2018-12-09 21:46:07 -08:00
Junyu Lai
0882543a12 Merge "Refactoring of deleting stats in NetworkStats based on uids." 2018-12-10 05:15:28 +00:00
Etan Cohen
79cee813c9 Merge "[CS] Add a generic transport-specific information API" am: 7f50b11c89
am: 14062aa659

Change-Id: If70fb160c90afbfb646ca7474d06fe735031aed5
2018-12-08 20:19:32 -08:00
Tony Huang
72285d3eb2 Expose Uri toSafeString api
Expose toSafeString api as public and stand api.

Bug: 119153962
Test: atest UriTest
Change-Id: Id9da309193c1e175e5fc795570687735c7722689
2018-12-08 04:35:23 +00:00
Etan Cohen
ca9fb56ee4 [CS] Add a generic transport-specific information API
Add a generic transport-specific information container interface and
access methods. These can be used by a network factory to pass transport
(bearer)-specific network parameters to the app.

Bug: 117605977
Test: atest frameworks/base/tests/net/java/android/net (+new unit tests)
Change-Id: Ib7c83b677e1c02a2212265719813e648b0c9cc1b
2018-12-07 17:37:48 +00:00
junyulai
8b8684abc9 Refactoring of deleting stats in NetworkStats based on uids.
In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d
2018-12-06 19:01:17 +09:00
Eran Messeri
309e071bb6 Private DNS connectivity check
Implement connectivity check to DNS-over-TLS servers, checking that the
RFC-defined port on the host is reachable and a TLS handshake can be
performed.

Bug: 112982691
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Change-Id: I1eb4ec201d7e096b969b7bc2bcba271f99de2d2f
2018-12-05 21:28:39 +00:00
Chiachang Wang
d94e7d893b Merge "Data stall detection using DNS event" am: 33fe80f927 am: 69b60f5a31
am: f720f0dbf8

Change-Id: I5c443b959a45b3a70902d5c9738a1687e16cc766
2018-11-27 20:33:20 -08:00
Chiachang Wang
f720f0dbf8 Merge "Data stall detection using DNS event" am: 33fe80f927
am: 69b60f5a31

Change-Id: I35e7e81fa0d6db6527ea6dd606d00046df3b9818
2018-11-27 20:18:54 -08:00
Chiachang Wang
33fe80f927 Merge "Data stall detection using DNS event" 2018-11-28 03:53:30 +00:00
Chiachang Wang
7a70a7e0ed Data stall detection using DNS event
If dns resolver on a network get consecutively timeout then it
is a strong signal that the network is no longer usable.
Reevaluate the network once it's data stall suspected

Test: 1. runtest frameworks-net
      2. SettingsBackupTest passes
      2. Run on wifi w/o internet capability
Bug: 112653893, 113916551

Change-Id: I74287b174d933f97a91fa1529b1809856ac3b38d
2018-11-27 18:00:05 +08:00
Benedict Wong
1215943a55 Merge changes from topic "xfrmi-support" am: f928c1e4b9 am: bc33474522
am: 03c6d371aa

Change-Id: I9c543d38c88181b12cdbc7bdb93d7e38f1dfd425
2018-11-25 19:38:35 -08:00
Benedict Wong
03c6d371aa Merge changes from topic "xfrmi-support" am: f928c1e4b9
am: bc33474522

Change-Id: I13a826f5ae3c4cb700be789b369848685da1bc41
2018-11-25 19:26:26 -08:00
Benedict Wong
781dae6306 Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
2018-11-21 08:34:54 -08:00
Benedict Wong
ab80e1fb30 Disable attempted updating of SA marks
SA marks are never updated during the UPDSA call. This change disables
the attempts to update the specified SAs, ensuring that the config
stored in IpSecService matches that of the allocated kernel resources.

Bug: 111854872
Test: Unit, CTS tests passing
Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9
2018-11-21 08:34:54 -08:00
Jack Yu
af2218bde6 Merge "Move hidden APIs into system APIs" am: 860d8d0d80
am: c3375240ba

Change-Id: Ibe6fa27d99791e57b1253a9dc990de0706b52fb6
2018-11-20 19:04:24 -08:00
Jack Yu
860d8d0d80 Merge "Move hidden APIs into system APIs" 2018-11-21 02:40:30 +00:00
Etan Cohen
5faec91513 Merge "Add IPv6 link-local address generation from EUI-48" am: a2a9df3e3a
am: 674479afe5

Change-Id: I63de4fa185649d9389a771860c479899e90b37e4
2018-11-19 16:48:22 -08:00
Jack Yu
4f956e0fca Move hidden APIs into system APIs
To allow vendor code to construct LinkAddress, which is
one of the parameter in the system API DataCallResponse.

Test: Build
Bug: 73659459
Merged-In: I3e203781d3a03285fa0e047cc8837ccb4a09016a
Change-Id: I3e203781d3a03285fa0e047cc8837ccb4a09016a
2018-11-19 14:40:13 -08:00
Jack Yu
b400507670 Move hidden APIs into system APIs
To allow vendor code to construct LinkAddress, which is
one of the parameter in the system API DataCallResponse.

Test: Build
Bug: 73659459
Change-Id: I3e203781d3a03285fa0e047cc8837ccb4a09016a
2018-11-19 14:37:44 -08:00
Etan Cohen
a8923c5aea Add IPv6 link-local address generation from EUI-48
Add a utility method to convert an EUI-48 to an IPv6 link-local
address based on RFC 4291 (EUI-64 generation) followed by RFC 4862.

Bug: 117605977
Test: atest MacAddressTest
Merged-In: I80b683e69da6beff3b37fc345fc15aa9610d09b7
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7
2018-11-16 21:50:24 -08:00
Etan Cohen
a4824cf401 Add IPv6 link-local address generation from EUI-48
Add a utility method to convert an EUI-48 to an IPv6 link-local
address based on RFC 4291 (EUI-64 generation) followed by RFC 4862.

Bug: 117605977
Test: atest MacAddressTest
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7
2018-11-16 14:00:22 -08:00
Roshan Pius
d84d668d45 Merge changes from topic "network_request_match_callback"
* changes:
  WifiManager: Network request match callback registration
  wifi(API): NetworkSpecifier for Wifi NetworkAgent
  wifi(API): Mark old API's deprecated
  wifi(API): New API surface for network suggestion
  wifi(API): New API surface for connection via NetworkRequest
2018-11-06 17:42:58 +00:00
Junyu Lai
e914f1e453 Merge "Extend onDnsEvent callback to report more fields." am: 89eb3e6117 am: 7a782be65d
am: 556ae82025

Change-Id: I50ef791009b0e9301ba10d8e52c3fd6c15e6b938
2018-11-04 21:05:47 -08:00
Junyu Lai
556ae82025 Merge "Extend onDnsEvent callback to report more fields." am: 89eb3e6117
am: 7a782be65d

Change-Id: Ic1b35f2b02dc60e301d39e89008617b341194382
2018-11-04 20:54:14 -08:00
Junyu Lai
89eb3e6117 Merge "Extend onDnsEvent callback to report more fields." 2018-11-05 04:29:47 +00:00
Luke Huang
13801b90e2 Merge "interface-related commands porting" am: 808c2fa747 am: 21fecd5957
am: f1fba3e8fd

Change-Id: I7a44b6e8521dd2a852bbd7b4e07599df8951f7b2
2018-11-01 00:46:40 -07:00
Luke Huang
f1fba3e8fd Merge "interface-related commands porting" am: 808c2fa747
am: 21fecd5957

Change-Id: Iab8092b55399397d9e9f2333ce358964562daed7
2018-11-01 00:31:30 -07:00
Luke Huang
808c2fa747 Merge "interface-related commands porting" 2018-11-01 07:09:54 +00:00
Roshan Pius
99cfe09fa2 wifi(API): NetworkSpecifier for Wifi NetworkAgent
Create an @hide NetworkSpecifier to use by the Wifi NetworkAgent. This
will be used by connectivity service to match the incoming
NetworkRequest (with WifiNetworkSpecifier) with the NetworkAgent we
created to serve that request.
The WifiNetworkAgentSpecifier will hold the current connected wifi
network configuration which will be used to pattern match the
WifiNetworkSpecifier from NetworkRequest's.

Also, added a @hide helper method in MacAddress to help with matching
bssid pattern.

Bug: 113878056
Test: Unit tests
Change-Id: I9a643f0b914d48ff64104c798ec2869db40cb24b
2018-10-31 09:23:15 -07:00
junyulai
4c2d2d5461 Extend onDnsEvent callback to report more fields.
When native layer reports onDnsEvent, netId, eventType and
returnCode are available only in NetdEventListenerService, but
not for the clients who register event on it.

Thus, extend the callback to give clients more detail on the
network the look up was performed on and the result of the
lookup.

Bug: 113916551
Test: 1. runtest frameworks-net
      2. runtest frameworks-services -c com.android.server. \
         net.watchlist.NetworkWatchlistServiceTests
Change-Id: If7beecea50e1baf18cb5c6775ad3ecb1a60b312a
2018-10-31 21:22:45 +08:00
Junyu Lai
74d5f7f24a Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2 am: d62c2baa6d
am: cadfe44e05

Change-Id: I9d0d8b67ed0159ba2a71059620ebe5698eb79ccb
2018-10-30 19:56:01 -07:00
Junyu Lai
cadfe44e05 Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2
am: d62c2baa6d

Change-Id: I3ee791e4b6fdd9d508807810183dc02c69bd2c0b
2018-10-30 19:46:18 -07:00
junyulai
c33ac0d43b Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
2018-10-30 21:23:38 +08:00
Luke Huang
8c12dcd11a Merge "Refactor UidRange by using stable aidl structure" am: d1d3b374b7 am: 53c8b8a939
am: 68f4bd92bc

Change-Id: I82e06fe93a3ed88368b649ef8d3283322191ffe7
2018-10-28 18:06:15 -07:00
Luke Huang
68f4bd92bc Merge "Refactor UidRange by using stable aidl structure" am: d1d3b374b7
am: 53c8b8a939

Change-Id: I09ac7fc6525948b76114ef936dc1b3d2d1bae0fb
2018-10-28 17:55:57 -07:00
Treehugger Robot
d1d3b374b7 Merge "Refactor UidRange by using stable aidl structure" 2018-10-29 00:17:34 +00:00
Luke Huang
1edf4c6397 Merge "Firewall-related commands porting" am: 1acfa7de1b am: 6ba18c6b03
am: b87796365e

Change-Id: I3a2d3115a9664fd2be458076d7a7092a7cb5293c
2018-10-25 21:21:01 -07:00