diff options
author | 2020-04-03 00:38:46 -0700 | |
---|---|---|
committer | 2020-04-03 13:55:27 -0700 | |
commit | fe76013f339325b68f00f3ce4491cf0f1ef3f7e7 (patch) | |
tree | d8800c1dbe5d3579f3510d31a9fa6e282b77532a | |
parent | e8a88834b77ca9d861af1851b3708889bf3be60f (diff) |
Making native transactions one-way as well.
Fixing crash in native callback after changing permissions.
Bug: b/152633648
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: Ifbc2d2d982d2dd9b0b9c0ed109f827de9bed2768
-rw-r--r-- | libs/binder/IAppOpsCallback.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/binder/IAppOpsCallback.cpp b/libs/binder/IAppOpsCallback.cpp index 0ce1dd59cf..b9eb281870 100644 --- a/libs/binder/IAppOpsCallback.cpp +++ b/libs/binder/IAppOpsCallback.cpp @@ -39,7 +39,7 @@ public: data.writeInterfaceToken(IAppOpsCallback::getInterfaceDescriptor()); data.writeInt32(op); data.writeString16(packageName); - remote()->transact(OP_CHANGED_TRANSACTION, data, &reply); + remote()->transact(OP_CHANGED_TRANSACTION, data, &reply, IBinder::FLAG_ONEWAY); } }; @@ -58,7 +58,6 @@ status_t BnAppOpsCallback::onTransact( String16 packageName; (void)data.readString16(&packageName); opChanged(op, packageName); - reply->writeNoException(); return NO_ERROR; } break; default: |