summaryrefslogtreecommitdiff
path: root/libs/binder/IAppOpsService.cpp
diff options
context:
space:
mode:
author Nate Myren <ntmyren@google.com> 2021-04-08 08:14:15 -0700
committer Nate Myren <ntmyren@google.com> 2021-04-08 17:37:56 +0000
commit2b437b27ecb8cb4c5b096e5d20993830c8b5b82a (patch)
tree3d7d236e9b62bf2eddaba23b282657ae0b4f9613 /libs/binder/IAppOpsService.cpp
parent0de23a9eafae2db42781b6db6994c7d52621e7a9 (diff)
Properly unparcel return from note/startOperation
still to do: replace manual unparcelling with a C++ SyncNotedAppOp class Fixes: 184695771 Test: atest AppOpsLoggingTest Change-Id: Id1d9e72d9b2e5ba74b4782ca8d014235cf8513a1
Diffstat (limited to 'libs/binder/IAppOpsService.cpp')
-rw-r--r--libs/binder/IAppOpsService.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/IAppOpsService.cpp b/libs/binder/IAppOpsService.cpp
index 44aa55e3b3..d59f44562e 100644
--- a/libs/binder/IAppOpsService.cpp
+++ b/libs/binder/IAppOpsService.cpp
@@ -18,8 +18,8 @@
#include <binder/IAppOpsService.h>
-#include <utils/Log.h>
#include <binder/Parcel.h>
+#include <utils/Log.h>
#include <utils/String8.h>
#include <optional>
@@ -63,6 +63,8 @@ public:
remote()->transact(NOTE_OPERATION_TRANSACTION, data, &reply);
// fail on exception
if (reply.readExceptionCode() != 0) return MODE_ERRORED;
+ // TODO b/184855056: extract to class
+ reply.readInt32();
reply.readByte();
return reply.readInt32();
}
@@ -85,6 +87,8 @@ public:
remote()->transact(START_OPERATION_TRANSACTION, data, &reply);
// fail on exception
if (reply.readExceptionCode() != 0) return MODE_ERRORED;
+ // TODO b/184855056: extract to class
+ reply.readInt32();
reply.readByte();
return reply.readInt32();
}