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

Commit 72f790b9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [3478311, 3478390, 3478133, 3478175, 3478391, 3478392,...

Merge cherrypicks of [3478311, 3478390, 3478133, 3478175, 3478391, 3478392, 3478393, 3478134, 3478135, 3478213, 3478214, 3478215, 3478233, 3478234, 3478235, 3478251, 3478252, 3478253, 3478254, 3478394, 3478395, 3478396, 3478397, 3478398, 3478399, 3478400, 3478401, 3478402, 3478403, 3478292, 3478293, 3478312, 3478136, 3477911] into oc-mr1-release

Change-Id: Id70027005744d19b11e7dfe10b6c92b92368e450
parents 41c800b9 86141f9d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -331,10 +331,13 @@ ssize_t CryptoHal::decrypt(const uint8_t keyId[16], const uint8_t iv[16],
            return status;
        }
        secure = false;
    } else {
    } else if (destination.mType == kDestinationTypeNativeHandle) {
        hDestination.type = BufferType::NATIVE_HANDLE;
        hDestination.secureMemory = hidl_handle(destination.mHandle);
        secure = true;
    } else {
        android_errorWriteLog(0x534e4554, "70526702");
        return UNKNOWN_ERROR;
    }

    ::SharedBuffer hSource;
+13 −2
Original line number Diff line number Diff line
@@ -16,14 +16,14 @@

//#define LOG_NDEBUG 0
#define LOG_TAG "ICrypto"
#include <utils/Log.h>

#include <binder/Parcel.h>
#include <binder/IMemory.h>
#include <cutils/log.h>
#include <media/ICrypto.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AString.h>
#include <utils/Log.h>

namespace android {

@@ -362,6 +362,17 @@ status_t BnCrypto::onTransact(
                    reply->writeInt32(BAD_VALUE);
                    return OK;
                }
                sp<IMemory> dest = destination.mSharedMemory;
                if (totalSize > dest->size() ||
                        (size_t)dest->offset() > dest->size() - totalSize) {
                    reply->writeInt32(BAD_VALUE);
                    android_errorWriteLog(0x534e4554, "71389378");
                    return OK;
                }
            } else {
                reply->writeInt32(BAD_VALUE);
                android_errorWriteLog(0x534e4554, "70526702");
                return OK;
            }

            AString errorDetailMsg;
+4 −0
Original line number Diff line number Diff line
@@ -294,6 +294,10 @@ status_t AACSource::read(
    if (options && options->getSeekTo(&seekTimeUs, &mode)) {
        if (mFrameDurationUs > 0) {
            int64_t seekFrame = seekTimeUs / mFrameDurationUs;
            if (seekFrame < 0 || seekFrame >= (int64_t)mOffsetVector.size()) {
                android_errorWriteLog(0x534e4554, "70239507");
                return ERROR_MALFORMED;
            }
            mCurrentTimeUs = seekFrame * mFrameDurationUs;

            mOffset = mOffsetVector.itemAt(seekFrame);