Commit Graph

5454 Commits

Author SHA1 Message Date
Jeffrey Vander Stoep
904252f7a3 Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891
am: 6729107f22

Change-Id: I4ec4b9a8954deec001841566e0722caa1a3fa248
2018-09-21 14:48:32 -07:00
Jeffrey Vander Stoep
f8529dc891 Merge "Add ConnectivityManager.getConnectionOwnerUid()" 2018-09-21 21:04:20 +00: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
Tianjie Xu
acae1964ed Merge "Remove the metrics report in recovery system" am: aff3248507
am: 8deaf75cfd

Change-Id: Id480a047be0799d6afc7cda472b6d4e00b48ec48
2018-09-20 23:01:09 -07:00
Tianjie Xu
aff3248507 Merge "Remove the metrics report in recovery system" 2018-09-20 17:39:36 +00:00
kopriva
05f984a1a8 docs: fixed typo
am: 9b5c03973e

Change-Id: I8873ab4139dd3c073584a0ffaf67611c11dea084
2018-09-13 02:31:56 -07:00
Mike Ma
43908f112b Merge "Avoiding potential NPE when dumping to proto." am: a52b601ef3
am: 8964390dd3

Change-Id: Ie9dc401990b4267b9bcf0469a3526db93dc438d2
2018-09-11 18:47:58 -07:00
Kweku Adams
ce8e43f8d2 Avoiding potential NPE when dumping to proto.
Inspired by aosp/736453. Cherry-picked from ag/4934453

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-11 19:21:52 +00:00
kopriva
9b5c03973e docs: fixed typo
Test: make ds-docs

Bug: 36942287

Change-Id: I6931817127a7b98a4b97e0e18cf4d654231c32f9
Exempt-From-Owner-Approval: Docs-only change
2018-09-10 14:02:58 -07:00
Tianjie Xu
d12e150f7a Remove the metrics report in recovery system
Move the report for non-A/B metrics to the native code in
recovery-persist. We will also handle the report of sideload
status for all devices there.

Bug: 114278989
Test: check the metrics report from recovery-persist.
Change-Id: I856f2f301a9d42979d0b207294cdf5d51d7e1e3f
2018-09-07 17:05:43 -07:00
Michael Wachenschwanz
379daa98dd Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189 am: 1f5050c054 am: 4fda414ed6
am: 78a2caeb94

Change-Id: Ie28836c6080238499bc218b2fb11597235e5b7a1
2018-09-05 20:59:25 -07:00
Michael Wachenschwanz
78a2caeb94 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189 am: 1f5050c054
am: 4fda414ed6

Change-Id: I7c7901f0147f7577240803cc2adc4e189f1994b4
2018-09-05 20:23:16 -07:00
Michael Wachenschwanz
4fda414ed6 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189
am: 1f5050c054

Change-Id: Ibae3dc08eabf5b12a8f1a03ea33bd54a28e0442e
2018-09-05 19:01:27 -07:00
Michael Wachenschwanz
1f5050c054 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev
am: d32c2a4189

Change-Id: Ie2ad590368e9c10f6222d9ae65470ebb12dabac2
2018-09-05 18:46:57 -07:00
Android Build Merger (Role)
7cf42221c6 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf am: 628cbe5c53 am: 433e4173ec am: 686897ddd9
Change-Id: I07c1d68a0c5d8da6ec81c717dff97d33dba86a16
2018-08-30 20:46:20 +00:00
Android Build Merger (Role)
686897ddd9 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf am: 628cbe5c53 am: 433e4173ec
Change-Id: I8375f1c1a860f5021efc5873e94b452a44d6c145
2018-08-30 20:46:12 +00:00
Android Build Merger (Role)
628cbe5c53 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf
Change-Id: Idaab5395d9e0970fe57b017bcba10f8757ffe3c7
2018-08-30 20:45:59 +00:00
Android Build Merger (Role)
d6947f1cbf [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3
Change-Id: Idb2572b46c48fe2f3e4b99c5cb4372dcfe6b20ce
2018-08-30 20:45:51 +00:00
Michael Wachenschwanz
057a01d1f3 Verify number of Map entries written to Parcel
Make sure the number of entries written by Parcel#writeMapInternal
matches the size written. If a mismatch were allowed, an exploitable
scenario could occur where the data read from the Parcel would not
match the data written.

Fixes: 112859604
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Change-Id: I325d08a8b66b6e80fe76501359c41b6656848607
Merged-In: I325d08a8b66b6e80fe76501359c41b6656848607
2018-08-30 13:40:44 -07:00
Mathew Inwood
a0c5ec60b3 Merge "Add @UnsupportedAppUsage annotations" am: 9137ecafbd
am: 2e5fdd0051

Change-Id: I217e9d2fbad18653d33a5a775047a5b0ffaba55d
2018-08-30 09:10:27 -07:00
Mathew Inwood
71da3a1fe4 Add @UnsupportedAppUsage annotations
For all remaining unannotated code.

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: I32861fa341a08f11a9c50c07a1ef7404dadf6bb6
Merged-In: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:01 +01:00
dwchen
df80c8d7cc Merge "Fixes possible issue with no-op creator." into pi-dev
am: f5411070a8

Change-Id: I29e126cdf7b4929a5ffd1fadafb3b93fc5ee8ca0
2018-08-29 15:35:43 -07:00
Jeff Sharkey
6324854fa0 Merge "Q." am: 20cc0ef048
am: 4c9108ca39

Change-Id: I6b1a9798e89ae68ce55229576a6eac84773356ce
2018-08-28 12:56:57 -07:00
Jeff Sharkey
5c877634ae Q.
Clean cherry-pick of ag/4057716.

Bug: 77588754
Test: builds, boots
Change-Id: Ib1d993fe2949f480a350acfa7e2b3cfdc7abd257
Merged-In: Ib1d993fe2949f480a350acfa7e2b3cfdc7abd257
2018-08-28 17:51:35 +00:00
dwchen
78622d57ad Fixes possible issue with no-op creator.
Leaving a no-op CREATOR can lead to issues. We throw a run-time
exception to prevent anyone from using this. The StatsLogEventWrapper is
meant to be write-only since it's only used to send data to statsd.

Bug: 112550251
Test: Tested with provided POC app by external researcher.
Change-Id: I001d84e2a61a1cd8a4f59aa156ca52f73ad0f6e1
2018-08-23 11:35:01 -07:00
Luke Huang
eaa77a20e8 Merge "Clatd-related commands porting" am: 3b9ae0ae48
am: 198936ce60

Change-Id: I6c094b45dd4535b9bfc3438d8f376a3c0b320d48
2018-08-15 00:56:39 -07:00
Luke Huang
3b9ae0ae48 Merge "Clatd-related commands porting" 2018-08-15 03:38:50 +00:00
Steven Moreland
e4086dfff6 Merge "Clarify NativeHandle.java dup documentation." am: 5afc5894ad
am: 93483d3671

Change-Id: Ia34d72de62be27ebda2427f0d5a6e1b7edf25a6e
2018-08-14 14:54:07 -07:00
Steven Moreland
4a6566440f Merge "Implementing support for HIDL native handles in Java" am: 1e1d8d2485
am: 6580802918

Change-Id: I93fb4f36c56215a5a8018248d58c8dc17766fc19
2018-08-14 10:05:21 -07:00
Joshua Baxter
5d51a0d519 Merge "docs: fixed typo" into pi-dev
am: 3621bf192c

Change-Id: I16fff80e6624f18bb0c6dbf2da210a40fec069c3
2018-08-13 15:57:41 -07:00
Joshua Baxter
3621bf192c Merge "docs: fixed typo" into pi-dev 2018-08-13 22:43:17 +00:00
Steven Moreland
12a2c0ae3f Clarify NativeHandle.java dup documentation.
close must also be called.

Bug: 35098567
Test: N/A
Change-Id: I4d03effc82d7f6de7ca785ae4d12868ccc4ceddd
2018-08-13 14:31:20 -07:00
Nirav Atre
9850dd9751 Implementing support for HIDL native handles in Java
This change implements the equivalent of the C++ native_handle_t type in
Java. Similar to the C++ type, the NativeHandle class wraps an arraylist
of FileDescriptor objects, along with a raw data stream (integer array).

Bug: 35098567
Test: Ran m, hidl_test (C++ and Java). Functionality tests are included
in a separate CL.

Change-Id: Ic53f9a49ae17ce5708577a586230126ab0e222c7
2018-08-13 14:31:17 -07:00
Martijn Coenen
d909c7d1d0 Merge "BinderProxy dump: distinguish between empty descriptor and dead remote." am: 2e9e624c76 am: cbd295ea50
am: 23920a0da9

Change-Id: I383846f94ac467305710ec45902d601dd0379e96
2018-08-10 01:38:34 -07:00
Martijn Coenen
3796b0d6a6 BinderProxy dump: distinguish between empty descriptor and dead remote.
getInterfaceDescriptor() will return an empty string when the call
to retrieve it into the remote process fails. Proxies to a dead binder
process then show up as having an empty descriptor in the proxy dumps,
and can't be distinguished from live proxies with an empty descriptor.

Instead, if we get an empty string, check if the proxy is still alive,
so we can more accurately dump. This will make it much easier to find
proxy leaks to dead binder nodes.

Bug: 109888955
Test: adb shell dumpsys activity binder-proxies
Change-Id: Ib37ec004f38c99743ffb4a62101c12626b649e5d
2018-08-09 16:19:45 +02:00
Makoto Onuki
09663b4ada Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b am: c5d7fdef72
am: 39ddb130ec

Change-Id: Ib33c1e9f57ce727d6ecb1a5f799c0570c6b32208
2018-08-08 13:05:36 -07:00
Makoto Onuki
9b04b2fd0b Merge "Add a hidden API for fgetfilecon(3)" 2018-08-08 14:51:19 +00:00
Andrew Solovay
28ff310752 Merge "docs: Adding links to "about version" pages" into pi-dev
am: 97229ed3e8

Change-Id: Ib692819ddf8ef786b5a44c9c8b3e35909f9ebc72
2018-08-07 12:02:00 -07:00
Andrew Solovay
a861ff7a64 docs: Adding links to "about version" pages
For the various Build.VERSION_CODES.<version_name> constants, adding
a link to the appropriate "about this release" page in
/about/versions/ , if there is one.

Staged doc to:
http://go/dac-stage/reference/android/os/Build.VERSION_CODES

Bug: 80546406
Test: make ds-docs
Change-Id: If363445c938d325172da6beeed25e821121c5539
2018-08-06 16:13:10 -07:00
Makoto Onuki
9700015b36 Add a hidden API for fgetfilecon(3)
Test: manual test with the debug code
Bug: 111381531
Change-Id: Ie9d6fe9e737b852cc825990a83bda6eb95cf1160
2018-08-06 14:31:45 -07:00
Luke Huang
69369f3391 Clatd-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of clatd works
Change-Id: Ia7ee6721870f9fc8f1490e758198a01c452ebac6
2018-08-02 15:51:41 +08:00
Martijn Coenen
1d336da880 resolve merge conflicts of 80894b6063 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7c36f66c4bf9129c1b421290f82bdae83be6979e
Merged-In: If9dd6913868a34ea1e3d14fee1860a4ff368e06b
2018-07-24 20:04:57 +02:00
Martijn Coenen
f7e8f096d5 Make BinderProxy @hide public class.
To make some future refactoring easier.

Added some JavaDoc (mostly links to android.os.IBinder)
to make checkstyle happy.

Test: builds
Merged-In: If9dd6913868a34ea1e3d14fee1860a4ff368e06b
Change-Id: If9dd6913868a34ea1e3d14fee1860a4ff368e06b
(cherry picked from commit 03e6d923c5)
2018-07-22 15:04:08 +09:00
Josh Gao
1fad55e868 Merge changes from topic "bionic_fdsan_java"
am: bb352287c9

Change-Id: Ib6c5ac9ffc7f9aa88749af1c0d66880a1c98a650
2018-07-20 21:14:33 -07:00
Josh Gao
5ada87388c ParcelFileDescriptor: support bionic's fd ownership tracking.
Also, delete a bunch of deprecated functions that are package-private,
and not called anywhere in the package.

Test: booted walleye
Change-Id: I728e63e7d6f9e1ba42644f93983cfcd6a2d2634c
2018-07-20 16:00:20 -07:00
Yifan Hong
58faaa09da IBatteryPropertiesRegistrar: remove unused functions
* Remove BatteryProperties
* Remove IBatteryPropertiesListener
* Remove IBatteryPropertiesRegistrar.(un)registerListener
  functions

Test: builds
Test: boots
Bug: 68724651
Change-Id: Ic9a9d337e5cb39784db1a2745297ef985dd31653
Merged-In: Ic9a9d337e5cb39784db1a2745297ef985dd31653
(cherry picked from commit dd0e942597)
2018-07-17 15:35:49 -07:00
John Reck
107e6f2f53 Remove unneeded JNI method
Test: ran PFD CTS tests
Change-Id: I9a40319595c757835f7e19a50dc0311077c9e627
Merged-In: I9a40319595c757835f7e19a50dc0311077c9e627
(cherry picked from commit d7bd919075)
2018-07-16 16:32:38 -07:00
Olivier Gaillard
06aa142232 Merge "Add a getTransactionName method to Binder."
am: 079f03f584

Change-Id: Ie157d490cf074d5b015406cb9739366cc4d46b87
2018-07-10 01:50:30 -07:00
Olivier Gaillard
d3d065dc42 Add a getTransactionName method to Binder.
This method transforms a binder call code to a human readable name.
AIDL generator will have the ability to override this method.

Test: n/a
Bug: 111200705

Change-Id: Ic1d82e9b403ab40c8b625ca977a819ccd521dd97
2018-07-09 20:58:51 +00:00
Ryo Hashimoto
9e2177b492 Merge "Use ParcelFileDescriptor's C++ implementation in libbinder"
am: 20e243d627

Change-Id: I0bc6158d1c37ee8a02450dee55ca6732d878fde3
2018-06-11 01:25:46 -07:00