Commit Graph

3619 Commits

Author SHA1 Message Date
Blake Lawson
4d0997093e Merge "Fix typo in IpConfiguration comment" am: 7b7e05459f
am: a42857e3a4

Change-Id: I0871973d37267215fc31455015a37e6a8a60d821
2018-08-23 21:17:32 -07:00
Treehugger Robot
7b7e05459f Merge "Fix typo in IpConfiguration comment" 2018-08-24 03:43:38 +00:00
Remi NGUYEN VAN
d8f0416ffc Merge changes I2cea553a,Id8d3dcf6,I19e68e88,I35598935,Idd7dc369, ... am: e01b4ce6c7
am: e06ae295a2

Change-Id: If4f9e1b498855af05011cbd0f529e346bebd4cbd
2018-08-23 20:42:23 -07:00
Blake Lawson
0c9ed965d3 Fix typo in IpConfiguration comment
Bug: NONE
Test: NONE
Change-Id: Ib2ce166532292266da17ec85c16e400afe4f9111
2018-08-23 08:43:07 -07:00
Remi NGUYEN VAN
a420b57a6b Add DhcpServingParams
Those parameters will be used to start DhcpServer or update its
configuration.

Test: runtest DhcpServingParamsTest.java
Bug: b/109584964
Change-Id: Id8d3dcf62d66dcb02accffa8d8500e30f07af452
2018-08-23 17:29:48 +09:00
Remi NGUYEN VAN
12da4a5efc Add util to add an ARP table entry
This is to be used by the new DhcpServer to add ARP entries with new
addresses before sending unicast responses.

Test: manual: cat /proc/net/arp with implementation based on this
Bug: b/109584964
Change-Id: I3559893583aa3c49b188ad689a41ee2f3e9d9bf3
2018-08-23 16:01:44 +09:00
Mathew Inwood
6b269a7e26 Merge "Add @UnsupportedAppUsage annotations" am: d717c04b12
am: 629a3828e2

Change-Id: I99215dd5430968df2e2dd514d21b396b00c1403e
2018-08-16 03:29:58 -07:00
Mathew Inwood
fa3a7466e1 Add @UnsupportedAppUsage annotations
For packages:
  android.net.wimax
  android.net.wifi.p2p.nsd
  android.net.wifi.p2p
  android.net.wifi.hotspot2.pps
  android.net.wifi.hotspot2.omadm
  android.net.wifi.hotspot2
  android.net.wifi.aware
  android.net.wifi
  android.net.util
  android.net.sip
  android.net.rtp
  android.net.nsd
  android.net.metrics
  android.net.lowpan
  android.net.http
  android.net.captiveportal
  android.net

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: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
2018-08-14 14:44:29 +01:00
Roshan Pius
38ee840954 Merge "NetworkAgent: Send primitive integer in explicitlySelected" am: bf66847240
am: 50a9fc9189

Change-Id: I5c00ed2031433b1176e41a1c01fd80b90fe0d27c
2018-08-13 15:37:07 -07:00
Treehugger Robot
bf66847240 Merge "NetworkAgent: Send primitive integer in explicitlySelected" 2018-08-13 17:09:51 +00:00
Roshan Pius
9265b5610e Merge "NetworkAgent: Send primitive integer in score" am: 7e83b79010 am: c039ad203e
am: bed7695b13

Change-Id: I8ca588bfcee7488c05ff33a2f85beb6aa2299776
2018-08-10 09:17:51 -07:00
Roshan Pius
eaf8dee367 NetworkAgent: Send primitive integer in explicitlySelected
|Boolean| object is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer instead to
represent the boolean value.

Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: Iac69fd302e1f1338ed0da1446105ffc5855451cc
2018-08-10 07:44:33 -07:00
Roshan Pius
7e83b79010 Merge "NetworkAgent: Send primitive integer in score" 2018-08-10 14:33:07 +00:00
Roshan Pius
64e99ef26d NetworkAgent: Send primitive integer in score
|Integer| is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer should suffice
for sending the value to the server. There are no other usage of
|EVENT_NETWORK_SCORE_CHANGED| in the codebase.

Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: I4c8fc17f4b803f69a4d882c71a8ce014a194d1ba
2018-08-09 07:10:27 -07:00
Remi NGUYEN VAN
f76484af05 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592
am: fb9247e38d

Change-Id: I755a029d35edb73924dbeccc698901dea533c57d
2018-08-08 12:21:25 -07:00
Remi NGUYEN VAN
d2cb322e93 Add codewiz@, reminv@ to OWNERS for connectivity
Test: m
Change-Id: I11df4c93ac61b620fc576a2ff17192b7c9ecb984
2018-08-08 12:22:20 +09:00
Adam Vartanian
d20922c8fa Merge "Add getter for X509 certificate" am: 38c9e614af am: 8547723200
am: b84bf6bc3d

Change-Id: I7f839b834611e61f7791ea163d988888c70371bb
2018-08-07 11:10:42 -07:00
Xin Li
e80b455065 Merge "Merge Android Pie into master" 2018-08-07 16:51:24 +00:00
Adam Vartanian
8547723200 Merge "Add getter for X509 certificate"
am: 38c9e614af

Change-Id: I8fa19741bded56170cca7e5bc74959eeaaa67455
2018-08-07 09:48:33 -07:00
Treehugger Robot
38c9e614af Merge "Add getter for X509 certificate" 2018-08-07 15:35:27 +00:00
Remi NGUYEN VAN
30d7f75028 Merge "Add logging for private DNS probes" am: 10c593cf7f am: 7eaf659610
am: bbb1de4d29

Change-Id: Ib0735c3b10e47623298d2c7a865e7fdb4c02a6e6
2018-08-06 20:13:19 -07:00
Remi NGUYEN VAN
7eaf659610 Merge "Add logging for private DNS probes"
am: 10c593cf7f

Change-Id: I10ade4a29cea40bd477861e4e42e7177ef3afc20
2018-08-06 19:52:32 -07:00
Xin Li
02857a7219 Merge Android Pie into master
Bug: 112104996
Change-Id: Id91836f22f2c9842975ac5b55f0f18b89db9b2f5
2018-08-06 19:20:02 -07:00
Remi NGUYEN VAN
10c593cf7f Merge "Add logging for private DNS probes" 2018-08-07 01:29:14 +00:00
Adam Vartanian
2e966dce50 Merge "Clarify which methods return connected sockets" am: bce398bfd3 am: a618570424
am: be6676d6c3

Change-Id: Ib49018d96a66694da97c5f10d587aab782c33d51
2018-08-06 13:11:46 -07:00
Adam Vartanian
46da5c1248 Merge "Add libcore as owners of relevant android/net files" am: 24f3809258 am: 484a866b19
am: fb1d12a78f

Change-Id: Iec491a89c6bdd306ec45c2427c4a4013cdd082a2
2018-08-06 12:52:17 -07:00
Remi NGUYEN VAN
0a56b25bcf Merge "Add utils to convert Inet4Address <-> int" am: 5caebe3415 am: 2595e68176
am: 004c3347ad

Change-Id: I8dac87304c9e7487715109b52fb8a43b948094e6
2018-08-06 12:18:52 -07:00
Adam Vartanian
a618570424 Merge "Clarify which methods return connected sockets"
am: bce398bfd3

Change-Id: Idb4fb49af7a2e2e9a7a9cdb0681803628e7ed269
2018-08-06 09:56:11 -07:00
Adam Vartanian
484a866b19 Merge "Add libcore as owners of relevant android/net files"
am: 24f3809258

Change-Id: I43cebb427d67f9dddbc76e1c284ceb8835d541c4
2018-08-06 09:51:22 -07:00
Remi NGUYEN VAN
2595e68176 Merge "Add utils to convert Inet4Address <-> int"
am: 5caebe3415

Change-Id: I347d23f4682eca623e3b10f72bc9000b1c5954a3
2018-08-06 09:34:55 -07:00
Treehugger Robot
bce398bfd3 Merge "Clarify which methods return connected sockets" 2018-08-06 15:00:37 +00:00
Treehugger Robot
24f3809258 Merge "Add libcore as owners of relevant android/net files" 2018-08-06 14:58:28 +00:00
Adam Vartanian
98a8217372 Add libcore as owners of relevant android/net files
Test: build/make/tools/checkowners.py frameworks/base/core/java/android/net/OWNERS frameworks/base/core/java/android/net/http/OWNERS
Change-Id: Iebef4381693d6cfadd437ed9e08a7f02bc96e6b7
2018-08-06 11:59:49 +01:00
Remi NGUYEN VAN
0066bda4cf Add utils to convert Inet4Address <-> int
The current utilities map the higher-order bytes of ints to the
lower-order bytes of IPv4 addresses, which makes applying masks and
generating series of addresses confusing.

For example, the current utilities would convert 1.2.3.4 to 0x04030201,
or generate 0x0080ffff for a /17 subnet mask. The utilities in this CL
convert 1.2.3.4 to 0x01020304, and a /17 subnet mask is represented as
0xffff8000.

Includes tests for all the above methods and migration of
NetworkUtilsTest to JUnit4.

Test: added tests pass
Change-Id: I5f5aa2e6e3b054b66b9dc507dab64f41be9139b1
2018-08-03 15:55:24 +09:00
Adam Vartanian
acca0090fb Clarify which methods return connected sockets
Some methods in SSLCertificateSocketFactory return connected sockets
and some return unconnected sockets.  Be explicit in each method's
documentation about whether it returns a connected or unconnected
socket.

Bug: 37618511
Test: cts -m CtsNetTestCases -t android.net.cts.SSLCertificateSocketFactoryTest
Change-Id: Ia9c6c8bec15a2d3fbd0d86f8accff13627c79565
2018-08-02 14:54:59 +01:00
Adam Vartanian
6309c61d33 Add getter for X509 certificate
Users have requested access to the underlying certificate, which is
usually available (as all non-deprecated constructors set it) and can
give access to additional properties that are useful to developers,
allow them to validate it with an X509TrustManager, or otherwise use
it with APIs that take an X509Certificate object.

Bug: 111696337
Bug: 36984840
Test: cts -m CtsNetTestCases -t android.net.http
Change-Id: I6aebaa38fad683e09e095e5b5e2f3424694ec426
2018-07-27 14:25:01 +01:00
kopriva
3711c6c00c docs: added Android P behavior change note to untagSocket reference
am: 5ad001eb4f

Change-Id: I814224210475078c4ab01f53e42202a538c8a444
2018-07-26 17:17:16 -07:00
kopriva
5ad001eb4f docs: added Android P behavior change note to untagSocket reference
staged here:
https://android-dot-devsite.googleplex.com/reference/android/net/TrafficStats#untagSocket(java.net.Socket)

Test: make ds-docs

Exempt-From-Owner-Approval: Docs-only change

Bug: 110484513
Change-Id: I24575e6f4451a019b60c5bf60e17e14a928c6cc3
2018-07-26 20:29:39 +00:00
Neil Fuller
3b3a29e316 Merge "Move UriCodec to be near its one user"
am: 55d8b54ac3

Change-Id: I847df7436d4ef6d1bac9513e7b3579abecc6f87d
2018-07-24 09:15:59 -07:00
Neil Fuller
0f6f3bd7f0 Move UriCodec to be near its one user
The only user of UriCodec is android.net.Uri so it can
be moved to android.net.

This change moves the UriCodecTest to the unit tests
and there is an associated change to Uri's CTS tests
to ensure we're testing public method behavior there too.

Test: make droid && make cts
Bug: 111055375
Change-Id: Id032f849b439adf3fd7cb1a3c8b234a5eec68fac
2018-07-23 19:53:11 +01:00
Remi NGUYEN VAN
dcb722fdd4 Add logging for private DNS probes
Also includes registering validation events as metrics.

Bug: b/111596247
Test: as follows:
  - Built, flashed, booted
  - Configured strict mode
  - Connected to working WiFi, then WiFi with no connectivity
  - Changed private DNS server to invalid value
  - Re-connected to working WiFi
  - adb shell dumpsys connectivity has PROBE_PRIVDNS events with success
    and failures of the probe

Change-Id: I2691dffd60593fdeaedd22f7ec04a76029f6297c
2018-07-20 18:13:24 +09:00
Neil Fuller
7e6a128ec7 Merge "Track OkHttp changes"
am: 0083876870

Change-Id: Id872a519323e5e3237fb708fa7d2d9eeae579650
2018-07-17 09:16:15 -07:00
Neil Fuller
cfa116949b Track OkHttp changes
As part of creating a full facade over OkHttp code there
are some changes to OkHttp-related classes that must be tracked.
See the related external/okhttp commit for details.

Some non-functional lint / WS changes have been made as part of this
change.

Test: Ran CtsLibcoreOkHttpTestCases entirely
Test: Ran CtsLibcoreTestCases entirely
Test: run cts-dev -m CtsNetTestCases -t android.net.http.cts.HttpResponseCacheTest
Bug: 111055375
Change-Id: I0b0ec21fa376ea33e2fa5486e203e92d3c3337cf
2018-07-17 10:48:15 +01:00
Chalard Jean
85bae863f5 Merge changes I6abd2221,I2c149d29,I45d22857,I1f879b2c,If4986a25, ...
am: 6c0106b57f

Change-Id: I86bc83e2bd859b48017f12832e9ff0080ec162b8
2018-06-12 06:57:33 -07:00
Chalard Jean
6823744fa6 Small cleanup of Network.
Test: runtest
Change-Id: I56dbd37bb8f890938d360f45835de72be4beb91a
2018-06-12 19:03:14 +09:00
Chalard Jean
b8cfa1d0eb Cleanup of LinkProperties.
Test: runtest
Change-Id: I7299de93a79901635ce755a2d933666ee43767d5
2018-06-12 19:03:07 +09:00
Chalard Jean
9f0df265ba Merge changes Ifd7d73ad,Id79096fa
am: bfe3b1a691

Change-Id: I263f51ba2aafdf8e19e020b2a4f6ff1b8238fa3c
2018-06-11 06:12:34 -07:00
Chalard Jean
faaf2fe700 Bugfixes in LinkProperties#toString
We should stop trying to use a human brain to write code

Test: manual
Change-Id: Ifd7d73ad65de0f671466080beacbd97287e17bfe
2018-06-11 18:48:37 +09:00
Chalard Jean
4d660114dc Cleanup of ConnectivityManager.
This is not exhaustive, but still an undeniable improvement.

Test: runtest frameworks-net
Change-Id: Id79096faf20eec80de7c17b261ef338b895af1e0
2018-06-11 18:48:37 +09:00
nharold
b2749539c0 Merge changes from topic "ipsec-sync-with-pi"
* changes:
  Disable the AppOp Restriction for IpSec Tunnels
  Rework Exception Handling for IpSecManager
  Update IpSecManager to use InetAddress and prefixLen
  Add AppOps Checks for MANAGE_IPSEC_TUNNELS
  Add MANAGE_IPSEC_TUNNELS Permission
2018-06-08 17:07:11 +00:00