Commit Graph

3640 Commits

Author SHA1 Message Date
Mathew Inwood
53f089f843 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: I520be7a4c79e68310c12e4f55bf66acaa94145a1
2018-08-14 14:39:24 +01:00
Roshan Pius
e127ca4293 Merge "NetworkAgent: Send primitive integer in explicitlySelected" am: bf66847240 am: 50a9fc9189
am: 38ee840954

Change-Id: If8ebb61aa2e11516932977457fde64eca35046b5
2018-08-13 15:50:38 -07: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
690e90653c Merge "NetworkAgent: Send primitive integer in score" am: 7e83b79010 am: c039ad203e am: bed7695b13
am: 9265b5610e

Change-Id: I31c885ca25afe6724f7549bba2cd3ae99b1477af
2018-08-10 09:39:49 -07: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
2c871f9241 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592 am: fb9247e38d
am: f76484af05

Change-Id: I1d77e198618d1de05f952ae58abb3b79e66e49e3
2018-08-08 16:44:05 -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
34c44387e0 Merge "Add getter for X509 certificate" am: 38c9e614af am: 8547723200 am: b84bf6bc3d
am: d20922c8fa

Change-Id: I8ee33d3dcad120b3e86b4ecc40b005d10d205da8
2018-08-07 11:28:50 -07: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
442deb0156 Merge "Add logging for private DNS probes" am: 10c593cf7f am: 7eaf659610 am: bbb1de4d29
am: 30d7f75028

Change-Id: I7cb7f98fab2f58a525830acc7d505dd5459a0682
2018-08-06 23:49:25 -07: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
Adam Vartanian
ab3ac1c80e Merge "Clarify which methods return connected sockets" am: bce398bfd3 am: a618570424 am: be6676d6c3
am: 2e966dce50

Change-Id: I32fe00a542e593a296c097c1da3a398b67fc8166
2018-08-06 20:08:01 -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
Adam Vartanian
23bd0084d8 Merge "Add libcore as owners of relevant android/net files" am: 24f3809258 am: 484a866b19 am: fb1d12a78f
am: 46da5c1248

Change-Id: I274facfcab99630b75718a827ad3af1581c844fe
2018-08-06 19:52:24 -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
Remi NGUYEN VAN
29807b19b0 Merge "Add utils to convert Inet4Address <-> int" am: 5caebe3415 am: 2595e68176 am: 004c3347ad
am: 0a56b25bcf

Change-Id: I5282dd7d5ec2e708241e19e414e887491c4969f9
2018-08-06 13:51:11 -07: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
688be1a850 docs: added Android P behavior change note to untagSocket reference am: 5ad001eb4f
am: 3711c6c00c

Change-Id: Ib4bb5d2d1b3f33bab69b5e109b23978a5f90da13
2018-07-26 17:25:49 -07: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
b432ba4ee0 Merge "Move UriCodec to be near its one user" am: 55d8b54ac3 am: 3b3a29e316 am: a37c7c3199
am: 56f169cf64

Change-Id: Ib619a3a49f504aa7b47a123fd44eeaee939bf0b9
2018-07-24 10:30:45 -07: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
5828cf27fc Merge "Track OkHttp changes" am: 0083876870 am: 7e6a128ec7
am: f6e34a96ed

Change-Id: Ia54aa0c10bc96bab0f7df1f93956c925f9bf5e17
2018-07-17 09:47:38 -07: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
55f12784b8 Merge changes I6abd2221,I2c149d29,I45d22857,I1f879b2c,If4986a25, ... am: 6c0106b57f am: 85bae863f5
am: d118c2b444

Change-Id: I19197e4bdc44d46e31c1e931e0e7b252f0b6bfa4
2018-06-12 07:39:54 -07: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