Loading libs/binder/Status.cpp +8 −2 Original line number Original line Diff line number Diff line Loading @@ -24,11 +24,17 @@ Status Status::ok() { } } Status Status::fromExceptionCode(int32_t exceptionCode) { Status Status::fromExceptionCode(int32_t exceptionCode) { if (exceptionCode == EX_TRANSACTION_FAILED) { return Status(exceptionCode, FAILED_TRANSACTION); } return Status(exceptionCode, OK); return Status(exceptionCode, OK); } } Status Status::fromExceptionCode(int32_t exceptionCode, Status Status::fromExceptionCode(int32_t exceptionCode, const String8& message) { const String8& message) { if (exceptionCode == EX_TRANSACTION_FAILED) { return Status(exceptionCode, FAILED_TRANSACTION, message); } return Status(exceptionCode, OK, message); return Status(exceptionCode, OK, message); } } Loading Loading @@ -136,7 +142,7 @@ status_t Status::writeToParcel(Parcel* parcel) const { // Something really bad has happened, and we're not going to even // Something really bad has happened, and we're not going to even // try returning rich error data. // try returning rich error data. if (mException == EX_TRANSACTION_FAILED) { if (mException == EX_TRANSACTION_FAILED) { return mErrorCode == OK ? FAILED_TRANSACTION : mErrorCode; return mErrorCode; } } status_t status = parcel->writeInt32(mException); status_t status = parcel->writeInt32(mException); Loading @@ -158,7 +164,7 @@ status_t Status::writeToParcel(Parcel* parcel) const { void Status::setException(int32_t ex, const String8& message) { void Status::setException(int32_t ex, const String8& message) { mException = ex; mException = ex; mErrorCode = NO_ERROR; // an exception, not a transaction failure. mErrorCode = ex == EX_TRANSACTION_FAILED ? FAILED_TRANSACTION : NO_ERROR; mMessage.setTo(message); mMessage.setTo(message); } } Loading Loading
libs/binder/Status.cpp +8 −2 Original line number Original line Diff line number Diff line Loading @@ -24,11 +24,17 @@ Status Status::ok() { } } Status Status::fromExceptionCode(int32_t exceptionCode) { Status Status::fromExceptionCode(int32_t exceptionCode) { if (exceptionCode == EX_TRANSACTION_FAILED) { return Status(exceptionCode, FAILED_TRANSACTION); } return Status(exceptionCode, OK); return Status(exceptionCode, OK); } } Status Status::fromExceptionCode(int32_t exceptionCode, Status Status::fromExceptionCode(int32_t exceptionCode, const String8& message) { const String8& message) { if (exceptionCode == EX_TRANSACTION_FAILED) { return Status(exceptionCode, FAILED_TRANSACTION, message); } return Status(exceptionCode, OK, message); return Status(exceptionCode, OK, message); } } Loading Loading @@ -136,7 +142,7 @@ status_t Status::writeToParcel(Parcel* parcel) const { // Something really bad has happened, and we're not going to even // Something really bad has happened, and we're not going to even // try returning rich error data. // try returning rich error data. if (mException == EX_TRANSACTION_FAILED) { if (mException == EX_TRANSACTION_FAILED) { return mErrorCode == OK ? FAILED_TRANSACTION : mErrorCode; return mErrorCode; } } status_t status = parcel->writeInt32(mException); status_t status = parcel->writeInt32(mException); Loading @@ -158,7 +164,7 @@ status_t Status::writeToParcel(Parcel* parcel) const { void Status::setException(int32_t ex, const String8& message) { void Status::setException(int32_t ex, const String8& message) { mException = ex; mException = ex; mErrorCode = NO_ERROR; // an exception, not a transaction failure. mErrorCode = ex == EX_TRANSACTION_FAILED ? FAILED_TRANSACTION : NO_ERROR; mMessage.setTo(message); mMessage.setTo(message); } } Loading