diff options
Diffstat (limited to 'libs/binder/IAppOpsService.cpp')
-rw-r--r-- | libs/binder/IAppOpsService.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/IAppOpsService.cpp b/libs/binder/IAppOpsService.cpp index d8922c906e..282b30fedd 100644 --- a/libs/binder/IAppOpsService.cpp +++ b/libs/binder/IAppOpsService.cpp @@ -45,8 +45,8 @@ public: data.writeString16(packageName); remote()->transact(CHECK_OPERATION_TRANSACTION, data, &reply); // fail on exception - if (reply.readExceptionCode() != 0) return 0; - return reply.readInt32() != 0; + if (reply.readExceptionCode() != 0) return MODE_ERRORED; + return reply.readInt32(); } virtual int32_t noteOperation(int32_t code, int32_t uid, const String16& packageName) { @@ -57,8 +57,8 @@ public: data.writeString16(packageName); remote()->transact(NOTE_OPERATION_TRANSACTION, data, &reply); // fail on exception - if (reply.readExceptionCode() != 0) return 0; - return reply.readInt32() != 0; + if (reply.readExceptionCode() != 0) return MODE_ERRORED; + return reply.readInt32(); } virtual int32_t startOperation(int32_t code, int32_t uid, const String16& packageName) { @@ -69,8 +69,8 @@ public: data.writeString16(packageName); remote()->transact(START_OPERATION_TRANSACTION, data, &reply); // fail on exception - if (reply.readExceptionCode() != 0) return 0; - return reply.readInt32() != 0; + if (reply.readExceptionCode() != 0) return MODE_ERRORED; + return reply.readInt32(); } virtual void finishOperation(int32_t code, int32_t uid, const String16& packageName) { |