Commit Graph

5422 Commits

Author SHA1 Message Date
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Luke Huang
9b20115264 Merge "Network-related commands porting" 2018-10-16 07:44:37 +00:00
Nandana Dutt
b3f7168136 Add DumpstateOptions java implementation
DumpstateOptions will be used to pass options to Dumpstate service
for specifying arguments for taking bugreports.

Test: m
Test: adb bugreport

Change-Id: I4dc9511f0be2f86239ea9094a3c527b6ce0d1d41
2018-10-11 17:05:35 +01:00
Luke Huang
8a462ecafd Network-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of network related function works
Change-Id: Id197d20c80b04378731b113ad74676672bd8b67e
2018-10-09 11:29:02 +08:00
Tor Norbye
f8dc2d204c Fix incorrect javadoc links
Test: make offline-sdk-docs
Bug: b/116163454
Change-Id: I55de1f71d443713b033ee63fd191bd34b3a52fd2
2018-10-08 19:58:17 +00: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
aff3248507 Merge "Remove the metrics report in recovery system" 2018-09-20 17:39:36 +00: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
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
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
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
Luke Huang
3b9ae0ae48 Merge "Clatd-related commands porting" 2018-08-15 03:38:50 +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
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
9b04b2fd0b Merge "Add a hidden API for fgetfilecon(3)" 2018-08-08 14:51:19 +00: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
Treehugger Robot
20e243d627 Merge "Use ParcelFileDescriptor's C++ implementation in libbinder" 2018-06-11 07:27:41 +00:00
Jerry Zhang
c2861c5698 Merge "Check for null path in getInternalPathForUser"
am: 0559afdbcc

Change-Id: I0669f429a389655e04f26ab4cd19fbf69f3dbef1
2018-06-08 16:55:43 -07:00
Treehugger Robot
0559afdbcc Merge "Check for null path in getInternalPathForUser" 2018-06-08 20:16:14 +00:00
Jerry Zhang
30f63cf1f9 Check for null path in getInternalPathForUser
In some situations, path could be null resulting
in a crash.

Test: no crash
Bug: 109730998
Change-Id: I2ce0410162d1327905d690331f461f9187e20906
(cherry picked from commit 6f6154bf04)
2018-06-08 11:26:33 -07:00
Neil Fuller
7dbefdcb92 resolve merge conflicts of 26119befba to pi-dev-plus-aosp
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iea64af5a88c9bf399fb26468e931be3c73061bac
2018-06-07 20:02:59 +01:00
Neil Fuller
d2f29d7a6f Remove CommonClock / CommonTimeManagementService
The service and associated code is unused.

Bug: 80462439
Test: build / boot
Merged-In: Ibdfab1b7d2951a0c45e07bd47850af037990841b
Change-Id: Ibdfab1b7d2951a0c45e07bd47850af037990841b
2018-06-06 17:03:55 +01:00
Martijn Coenen
e374ec2355 Merge "Serialize calls into BinderProxy." into pi-dev
am: 051b63d4b3

Change-Id: I9d725b05bc4b00eec7c6421e1a3313d6730ad042
2018-06-05 22:44:06 -07:00
Martijn Coenen
dfa390e080 Serialize calls into BinderProxy.
The BinderProxy class is not thread-safe, hence all calls into it
must be serialized. This was achieved by holding the gProxyLock in
JNI code. However, a recent change added calls into BinderProxy
from ActivityManagerService without holding that lock, causing
ConcurrentModificationExceptions.

Instead of dumping debug info from AMS, make the call directly
from JNI, so we can make sure gProxyLock is held correctly.

Also, only dump on debug builds.

Bug: 71353150
Bug: 109701487
Test: sailfish builds, boots, info gets dumped with lowered limits.
Change-Id: I446a71ce4115b9936a01a170401ef98ba3818c0b
2018-06-05 11:18:48 +02:00
Michael Wright
4af6ded846 Merge "Allow for any default vibration intensity level." into pi-dev
am: fb840c9170

Change-Id: Ia1df028a9a0011f47ef2de6ec50e64c227c4b418
2018-05-30 02:38:47 -07:00
Ryo Hashimoto
20529959e8 Use ParcelFileDescriptor's C++ implementation in libbinder
Bug: 80377815
Test: build
Change-Id: I5bfce159fc5c06df29aff9d93ed7d771b7c33d72
2018-05-30 17:57:34 +09:00
Michael Wright
0dbb516a43 Allow for any default vibration intensity level.
Because we can't always create the range of effects we'd like, we may
need different default intensity levels for different devices. This
works fine for prebaked effects, but for application defined amplitudes
we need to provide a scaling function. In addition, this scaling
function should leave amplitude values untouched in the default state so
that application developers produce the effects they expect.

Bug: 80275800
Test: manual
Merged-In: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
Change-Id: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
2018-05-30 00:21:38 +01:00
Martijn Coenen
a634f425d9 Merge "Dump proxy debug info when exceeding proxy limit." into pi-dev
am: 879d09f946

Change-Id: I02d14f682c6476b703d160dab911a3afc14af627
2018-05-26 02:19:18 -07:00
Martijn Coenen
eebac6d6b5 Dump proxy debug info when exceeding proxy limit.
If a process gets killed because it sends too many proxies,
dump proxy debug info so we can see what types of interfaces
it sends.

Bug: 71353150
Test: builds, output generated
Change-Id: I3a7787cb3fa73b0b4ad223b18cd79f44e22b9ef5
2018-05-25 20:13:24 +02:00
Andreas Gampe
4f11d5381e Merge "Framework: Add API to get zygote PID" am: 1109e2333f
am: 07578c786a

Change-Id: Ibee53631caad0d6ce2108970598f5226d20a849d
2018-05-24 13:49:41 -07:00
Treehugger Robot
1109e2333f Merge "Framework: Add API to get zygote PID" 2018-05-24 18:28:59 +00:00
Michael Wright
bd02d45b52 Merge "Uncanonicalize URIs before comparing them." into pi-dev
am: 467a831aa6

Change-Id: Ibe0197543af68f937baa4dae768bbc64d34370e4
2018-05-23 13:14:58 -07:00
Jovana Knezevic
f6eed4ba8c Merge "Adding hidden APIs for assigning Admin flag to users." into pi-dev
am: b662f94c37

Change-Id: I4c3d9e5e95cfafbc2f51e9379b516fa402836fe3
2018-05-23 12:21:20 -07:00
Kweku Adams
cb69a53ce5 Merge "Bumping BatteryStats report version." into pi-dev
am: 42b29eb462

Change-Id: I7d512c4b4373019e594dc0422d750b3dddaf3f68
2018-05-23 11:28:50 -07:00
Michael Wright
467a831aa6 Merge "Uncanonicalize URIs before comparing them." into pi-dev 2018-05-23 12:39:34 +00:00
Jovana Knezevic
b662f94c37 Merge "Adding hidden APIs for assigning Admin flag to users." into pi-dev 2018-05-23 05:16:55 +00:00
TreeHugger Robot
42b29eb462 Merge "Bumping BatteryStats report version." into pi-dev 2018-05-23 02:19:20 +00:00
jovanak
f24ad4993c Adding hidden APIs for assigning Admin flag to users.
Also fixing method for requiring both MANAGE_USERS
and INTERACT_ACROSS_USERS_FULL permissions.

Fixes: 80001332
Bug: 25935510
Test: unit test
Change-Id: If10166b4379ddc6a5f004eab77fa1f93abf6ac2a
2018-05-23 00:08:05 +00:00