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

Commit a72e26bb authored by Bill Yi's avatar Bill Yi
Browse files

Merge RQ2A.210405.006 to stage-aosp-master - DO NOT MERGE

Merged-In: I531ee79ff05db24edef1d2a0bba518b356a0e043
Change-Id: I8b7d3d8529cfca760d6477703bd105fc2a6ea95a
parents 4d595a25 0025b691
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ status_t DrmPlugin::getKeyRequest(
}

void DrmPlugin::setPlayPolicy() {
    android::Mutex::Autolock lock(mPlayPolicyLock);
    mPlayPolicy.clear();
    mPlayPolicy.add(kQueryKeyLicenseType, kStreaming);
    mPlayPolicy.add(kQueryKeyPlayAllowed, kTrue);
+1 −0
Original line number Diff line number Diff line
@@ -262,6 +262,7 @@ private:
    void initProperties();
    void setPlayPolicy();

    android::Mutex mPlayPolicyLock;
    android::KeyedVector<String8, String8> mPlayPolicy;
    android::KeyedVector<String8, String8> mStringProperties;
    android::KeyedVector<String8, Vector<uint8_t>> mByteArrayProperties;
+5 −1
Original line number Diff line number Diff line
@@ -119,7 +119,11 @@ Return<void> CryptoPlugin::decrypt_1_2(
        return Void();
    }

    if (source.offset + offset + source.size > sourceBase->getSize()) {
    size_t totalSize = 0;
    if (__builtin_add_overflow(source.offset, offset, &totalSize) ||
        __builtin_add_overflow(totalSize, source.size, &totalSize) ||
        totalSize > sourceBase->getSize()) {
        android_errorWriteLog(0x534e4554, "176496160");
        _hidl_cb(Status_V1_2::ERROR_DRM_CANNOT_HANDLE, 0, "invalid buffer size");
        return Void();
    }
+1 −0
Original line number Diff line number Diff line
@@ -304,6 +304,7 @@ Return<void> DrmPlugin::getKeyRequest_1_2(
}

void DrmPlugin::setPlayPolicy() {
    android::Mutex::Autolock lock(mPlayPolicyLock);
    mPlayPolicy.clear();

    KeyValue policy;
+1 −0
Original line number Diff line number Diff line
@@ -406,6 +406,7 @@ private:
    int64_t mCloseSessionOkCount;
    int64_t mCloseSessionNotOpenedCount;
    uint32_t mNextSecureStopId;
    android::Mutex mPlayPolicyLock;

    // set by property to mock error scenarios
    Status_V1_2 mMockError;