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

Commit 81c31a34 authored by Robert Shih's avatar Robert Shih
Browse files

DrmStatus type checks

Bug: 260065906
Change-Id: I1f290b744da748899d09821dc20e91f65430ef37
Test: MediaDrmClearKeyTest
parent e9bd2c84
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -27,21 +27,20 @@ DrmStatus::DrmStatus(status_t err, const char *msg) : mStatus(err) {
        return;
    }

    std::string errMsg;
    auto val = errorDetails["cdmError"];
    if (!val.isNull()) {
    if (val.isInt()) {
        mCdmErr = val.asInt();
    }
    val = errorDetails["oemError"];
    if (!val.isNull()) {
    if (val.isInt()) {
        mOemErr = val.asInt();
    }
    val = errorDetails["context"];
    if (!val.isNull()) {
    if (val.isInt()) {
        mCtx = val.asInt();
    }
    val = errorDetails["errorMessage"];
    if (!val.isNull()) {
    if (val.isString()) {
        mErrMsg = val.asString();
    } else {
        mErrMsg = msg;