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

Commit d0a154fb authored by Edwin Wong's avatar Edwin Wong Committed by Automerger Merge Worker
Browse files

Fix double free of play policy in a race condition. am: 4b86f1db am:...

Fix double free of play policy in a race condition. am: 4b86f1db am: 02dcf3a9 am: 23a3c612 am: 515608f3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/13472357

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I486d684c7e207abad87553ab9a6ed847a3cf93c6
parents 9d751d63 515608f3
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;
+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;