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

Commit a448fa6b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8287852 from 2d68a95f to tm-release

Change-Id: I1b4ce1818ec45a1bab5019bf03098efc5b6cf9bc
parents 6bcd5623 2d68a95f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -353,7 +353,9 @@ ssize_t CryptoHalAidl::decrypt(const uint8_t keyId[16], const uint8_t iv[16],

    err = statusAidlToStatusT(statusAidl);
    std::string msgStr(statusAidl.getMessage());
    if (errorDetailMsg != nullptr) {
        *errorDetailMsg = toString8(msgStr);
    }
    if (err != OK) {
        ALOGE("Failed on decrypt, error description:%s", statusAidl.getDescription().c_str());
        return err;
+6 −2
Original line number Diff line number Diff line
@@ -342,8 +342,10 @@ ssize_t CryptoHalHidl::decrypt(const uint8_t keyId[16], const uint8_t iv[16],
                [&](Status_V1_2 status, uint32_t hBytesWritten, hidl_string hDetailedError) {
                    if (status == Status_V1_2::OK) {
                        bytesWritten = hBytesWritten;
                        if (errorDetailMsg != nullptr) {
                            *errorDetailMsg = toString8(hDetailedError);
                        }
                    }
                    err = toStatusT(status);
                });
    } else {
@@ -353,8 +355,10 @@ ssize_t CryptoHalHidl::decrypt(const uint8_t keyId[16], const uint8_t iv[16],
                [&](Status status, uint32_t hBytesWritten, hidl_string hDetailedError) {
                    if (status == Status::OK) {
                        bytesWritten = hBytesWritten;
                        if (errorDetailMsg != nullptr) {
                            *errorDetailMsg = toString8(hDetailedError);
                        }
                    }
                    err = toStatusT(status);
                });
    }
+3 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include <binder/MemoryDealer.h>
#include <hidlmemory/FrameworkUtils.h>
#include <media/stagefright/foundation/AString.h>
#include <mediadrm/CryptoHal.h>
#include <mediadrm/DrmHal.h>
#include <utils/String8.h>
@@ -401,7 +402,7 @@ void DrmFuzzer::invokeCryptoDecrypt(const uint8_t *data) {
        .secureMemory = nullptr};

    const uint64_t offset = 0;
    AString *errorDetailMsg = nullptr;
    AString errorDetailMsg;
    CryptoPlugin::Mode mode;
    bool shouldPassRandomCryptoMode = mFuzzedDataProvider->ConsumeBool();
    if (shouldPassRandomCryptoMode) {
@@ -411,7 +412,7 @@ void DrmFuzzer::invokeCryptoDecrypt(const uint8_t *data) {
            kCryptoMode[mFuzzedDataProvider->ConsumeIntegralInRange<size_t>(0, kNumCryptoMode - 1)];
    }
    mCrypto->decrypt(keyId, iv, mode, pattern, sourceBuffer, offset, subSamples, numSubSamples,
                     destBuffer, errorDetailMsg);
                     destBuffer, &errorDetailMsg);

    if (heapSeqNum >= 0) {
        mCrypto->unsetHeap(heapSeqNum);
+3 −3
Original line number Diff line number Diff line
service vendor.drm-clearkey-service /vendor/bin/hw/android.hardware.drm-service.clearkey
service vendor.drm-clearkey-service /vendor/bin/hw/android.hardware.drm-service-lazy.clearkey
    oneshot
    disabled
    class hal
    user media
@@ -6,4 +7,3 @@ service vendor.drm-clearkey-service /vendor/bin/hw/android.hardware.drm-service.
    ioprio rt 4
    task_profiles ProcessCapacityHigh
    interface aidl android.hardware.drm.IDrmFactory/clearkey
 No newline at end of file
    interface aidl android.hardware.drm.ICryptoFactory/clearkey
+2 −3
Original line number Diff line number Diff line
@@ -212,9 +212,8 @@ public:
                (OMX_INDEXTYPE)OMX_IndexParamConsumerUsageBits,
                &usage, sizeof(usage));

        mSource->configure(
                mOmxNode, static_cast<hardware::graphics::common::V1_0::Dataspace>(mDataSpace));
        return OK;
        return GetStatus(mSource->configure(
                mOmxNode, static_cast<hardware::graphics::common::V1_0::Dataspace>(mDataSpace)));
    }

    void disconnect() override {