summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorOlivier Gaillard <gaillard@google.com>2019-01-30 17:11:40 +0000
committerOlivier Gaillard <gaillard@google.com>2019-02-01 13:43:43 +0000
commitbab444a731a2c473220b609cc8f5710e49f93745 (patch)
tree2b40e0c0127ca728e5a66e267ab33b8b16afa622 /tools/aapt2/java/JavaClassGenerator.cpp
parent79eed4bf12c9b5b0917620d92dac71b0cc1c4fdd (diff)
Fix a bug with worksource propagation.
It is properly added to the parcel when Binder.setCallingWorkSource is called manually, however it does not work when we call Binder.setCallingWorkSource in Binder#ProxyTransactListener. The problem is that we are adding the worksource to the parcel too early. It is called before we add the work source to the thread local (ThreadLocalWorkSource.setUid)... What currently happens - Client code calls an AIDL method - AIDL generated code calls writeInterfaceToken which add the headers to the parcel (including the worksource) - AIDL generated code calls Binder#transact - Binder#transact calls ProxyTransactListener#onTransactStarted --> this code is calling Binder.setCallingWorkSource too late. After writeInterfaceToken is called which is where the code calls Binder.getCallingWorkSource and add it to the parcel. To fix it, we udpate the parcel request headers if the work source has been fixed when the listener is called. Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest android.os.ParcelTest BinderProxyTest Bug: 123744028 Change-Id: Id1a4565c1f096d38bf1e423bea897da77ff84005
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions