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

Commit 6d9a2928 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: more descriptive prune error

We collapse errors into UNKNOWN_ERROR in the NDK API in order to avoid
exposing certain internal details. Now, the log when this happens
includes more information (instead of the code only).

Bug: N/A
Test: see:
    09-22 17:09:29.322  5753  5770 W roid.binder.ct: PruneStatusT:
    Unknown status_t (-129 (Key was rejected by service)) pruned into
    STATUS_UNKNOWN_ERROR
Change-Id: I4f47574857c47341b9500981101adcae75e864c7
parent a923111e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <android-base/logging.h>

using ::android::status_t;
using ::android::statusToString;
using ::android::binder::Status;

AStatus* AStatus_newOk() {
@@ -126,7 +127,7 @@ binder_status_t PruneStatusT(status_t status) {
            return STATUS_UNKNOWN_ERROR;

        default:
            LOG(WARNING) << __func__ << ": Unknown status_t (" << status
            LOG(WARNING) << __func__ << ": Unknown status_t (" << statusToString(status)
                         << ") pruned into STATUS_UNKNOWN_ERROR";
            return STATUS_UNKNOWN_ERROR;
    }