Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc1a5aef authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "libbinder_ndk: ScopedAStatus description compat" am: da4a5ca5 am:...

Merge "libbinder_ndk: ScopedAStatus description compat" am: da4a5ca5 am: a1509565 am: be8f04ee

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1553307

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia0f4e9f8237c0eafd1dc70a2fe3cb384e4d49fb9
parents 0ee421d7 be8f04ee
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -265,7 +265,18 @@ class ScopedAStatus : public impl::ScopedAResource<AStatus*, AStatus_delete, nul
            AStatus_deleteDescription(cStr);
            return ret;
        }
        return "(not available)";
        binder_exception_t exception = getExceptionCode();
        std::string desc = std::to_string(exception);
        if (exception == EX_SERVICE_SPECIFIC) {
            desc += " (" + std::to_string(getServiceSpecificError()) + ")";
        } else if (exception == EX_TRANSACTION_FAILED) {
            desc += " (" + std::to_string(getStatus()) + ")";
        }
        if (const char* msg = getMessage(); msg != nullptr) {
            desc += ": ";
            desc += msg;
        }
        return desc;
    }

    /**