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

Commit 0c75f9c8 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: ScopedAStatus description compat

When the nice platform API description isn't available, we can still
build something here.

Bug: 134795810
Test: N/A
Change-Id: I2b5eb8365c3b6f56e2ba967a21cf304909d147ff
parent cb8eb2be
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;
    }

    /**