Commit Graph

3641 Commits

Author SHA1 Message Date
Andrew Solovay
d10e384d6c resolve merge conflicts of a3e34fe9fe to pi-dev-plus-aosp
Bug: None
Test: Eyeballed (comment-only change).
Change-Id: Ia644cde66376b2bddeb27bb2a147b3266037aa2c
Exempt-From-Owner-Approval: Docs-only change
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 22:50:39 +00:00
Andrew Solovay
a3e34fe9fe Merge "docs: Replacing {#link with {@link" into pi-dev 2018-10-04 20:06:59 +00:00
Andrew Solovay
a44f2c075b docs: Replacing {#link with {@link
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.

Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.

Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.

Staged to:

go/dac-stage/reference/android/app/Instrumentation.html
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html
go/dac-stage/reference/android/bluetooth/BluetoothDevice.html
go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html
go/dac-stage/reference/android/inputmethodservice/InputMethodService.html
go/dac-stage/reference/android/view/KeyCharacterMap.html
go/dac-stage/reference/android/view/KeyEvent.html
go/dac-stage/reference/android/media/AudioManager.html
go/dac-stage/reference/android/net/wifi/WifiConfiguration.html

(Other files were not in the public Javadocs.)

Bug: 111925950
Test: make ds-docs
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 18:20:51 +00:00
kopriva
9c736132c2 Merge "docs: fixing several typos, bug 36941887" into pi-dev
am: 7640a41654

Change-Id: I4e95b8e43ce12a428baa41102260d6b145589a34
2018-10-03 16:58:12 -07:00
kopriva
c5fea19846 docs: fixing several typos, bug 36941887
Test: make ds-docs

Bug: 36941887

Change-Id: Id65c5a6b1cbb214ea46b13a6a68d667c819a2f60
Exempt-From-Owner-Approval: Docs-only change
2018-10-03 13:29:15 -07:00
Lorenzo Colitti
b0cac388e4 Merge "Make requestRouteToHost a no-op for system callers." am: f1bcfb6014
am: 07012857ae

Change-Id: Iefddec95271b56007794fa10f7f3a4122c68877e
2018-09-30 23:15:42 -07:00
Lorenzo Colitti
2e31a7c004 Make requestRouteToHost a no-op for system callers.
Everything in the system should now be using proper multinetwork
APIs instead of this insecure and error-prone API.

Make this method do nothing when called by the system. For now,
keep the code around for backwards compatibility for apps
targeting Android releases before M.

Bug: 25824776
Bug: 25876485
Test: FrameworksNetTests pass
Test: CtsNetTestCasesLegacyApi22 pass
Test: CtsNetTestCasesLegacyPermission22 pass
Test: android.net.cts.ConnectivityManagerTest passes
Change-Id: I9b3557faccccc95c7b954db6a13b853b4c7edea0
2018-10-01 12:05:42 +09:00
Jeffrey Vander Stoep
904252f7a3 Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891
am: 6729107f22

Change-Id: I4ec4b9a8954deec001841566e0722caa1a3fa248
2018-09-21 14:48:32 -07:00
Jeff Vander Stoep
0ac2c0945b Add ConnectivityManager.getConnectionOwnerUid()
Allow VPN apps to lookup the UID owner of a network connection.

Requires specifying the:
 - IP address and port for both the source and destination of a TCP
   connection.
 - IP address and port for either source and destination or just
   source for a UDP connection.
Only TCP and UDP protocols are supported. Only connections for UIDs
that apply to the calling VPN app will be resolved. This is intended
to replace direct app access to /proc/net/{tcp,tcp6,udp,udp6}.

The implementation uses netlink inet_diag sockets[1] to perform
the lookup on TCP sockets as well as UDP sockets when supported
(kernel has CONFIG_INET_UDP_DIAG=y).

[1] http://man7.org/linux/man-pages/man7/sock_diag.7.html

Bug: 9496886
Bug: 109758967
Test: atest HostsideVpnTests
Test: atest InetDiagSocketTest on Taimen with CONFIG_INET_UDP_DIAG
    and on Sailfish without CONFIG_INET_UDP_DIAG.
Change-Id: I2bbc7072dd091e2e653dadf6dc05024c04180f34
2018-09-21 06:16:09 +00:00
kopriva
9b641cbc71 docs: fixed instances of typo in 'overridden'
am: debd4ee72d

Change-Id: Idde6240486463dee51cdc27b8cd066a80fb869e0
2018-09-13 14:57:25 -07:00
kopriva
debd4ee72d docs: fixed instances of typo in 'overridden'
This affects several files beyond those mentioned in the bug.

I didn't fix some instances because the files had code
problems that blocked presubmit checks.

Test: make ds-docs

Bug: 37094741

Change-Id: I642f0384fef2b267ebc970bae1b4fb90bae667e7
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 11:40:59 -07:00
Tobias Thierer
1943c462cf Merge "Fix typo in android.net.Uri documentation." am: 8dc7e43bad
am: 47fb98e8a4

Change-Id: Ia63097f8ea8c66b0451e69469768b1e04e6d5eee
2018-09-12 13:14:21 -07:00
Tobias Thierer
149e506efc Fix typo in android.net.Uri documentation.
This typo has been present since before the "auto import"
of cupcake sources in 2009.

Bug: 114704047
Test: Treehugger
Test: Checked through source inspection that this really returns
      the encoded form: its implementation is ssp.getEncoded(),
      whose implementation in turn is:
      return hasEncoded ? encoded : (encoded = encode(decoded));
Change-Id: I0e4fed702e6b3012429778ccbd18a495a5d69e9f
2018-09-11 10:40:36 +01:00
Remi NGUYEN VAN
cae667c43e Merge "Add DhcpServer" am: e3a0f42e8e
am: dccc1866de

Change-Id: Ic3b1cd87389ade162c1c7441132f3e0451f1b78c
2018-08-28 20:42:08 -07:00
Erik Kline
37e01c985d Merge "Remove ResolveUtil from frameworks/base callers" am: 0e1621296f
am: 0bd9ac4b69

Change-Id: I3199337fd168f58f13a547d4eaff2be069a22f3d
2018-08-28 20:21:50 -07:00
Remi NGUYEN VAN
e3a0f42e8e Merge "Add DhcpServer" 2018-08-29 03:19:27 +00:00
Treehugger Robot
0e1621296f Merge "Remove ResolveUtil from frameworks/base callers" 2018-08-29 02:58:08 +00:00
Chih-Hung Hsieh
bb2ea09170 Merge "Use multiple patterns and emails in per-file syntax." am: 7dd3f1dca6
am: bb6b0f578a

Change-Id: I5547ca8887d5d24871af665acb71facc61aafd16
2018-08-28 12:51:10 -07:00
Treehugger Robot
7dd3f1dca6 Merge "Use multiple patterns and emails in per-file syntax." 2018-08-28 18:28:23 +00:00
Erik Kline
f4fa982339 Remove ResolveUtil from frameworks/base callers
Use the Private DNS bypass logic that was moved into Network.

Once all callers of ResolvUtil are updated to use this interface
ResolvUtil can be deleted.

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - connection to captive portal network detects portal correctly
      and the login activity functions as expected

Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 78548486

Change-Id: If11ef2b5ffdc729f8449cf18dccd5f1eccbc51e6
2018-08-28 12:59:21 +09:00
Remi NGUYEN VAN
a13007ad0f Add DhcpServer
This first version can serve discover/request/release, although there
are some small behavior changes with current implementation which will
be addressed later.

Also removes final modifiers on start() and stop() in FdEventsReader, to
allow mocking the methods in tests with the current mockito lib.

Test: Added tests pass, manual: flashed a device using the server
Change-Id: I025366ff7d51c4ba31152af50f3dd2b5e280a54d
2018-08-28 12:50:47 +09:00
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
Chih-Hung Hsieh
f690aebc09 Use multiple patterns and emails in per-file syntax.
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I1de13d357c4bcc51fd75d0df6f9bc994dfd17efb
2018-08-23 15:11:24 -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