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

Commit ec0754c9 authored by Edwin Wong's avatar Edwin Wong
Browse files

RESTRICT AUTOMERGE - resolve merge conflicts of...

RESTRICT AUTOMERGE - resolve merge conflicts of dab37c25 to qt-qpr1-dev

Test: Build
Bug: None
Change-Id: Ie5bbf5fff2f61aa76c8da2c99d05641046d0338e
parents b407f062 dab37c25
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -607,6 +607,7 @@ Return<void> DrmPlugin::getSecurityLevel(const hidl_vec<uint8_t>& sessionId,
        return Void();
    }

    Mutex::Autolock lock(mSecurityLevelLock);
    std::map<std::vector<uint8_t>, SecurityLevel>::iterator itr =
            mSecurityLevel.find(sid);
    if (itr == mSecurityLevel.end()) {
@@ -637,6 +638,7 @@ Return<Status> DrmPlugin::setSecurityLevel(const hidl_vec<uint8_t>& sessionId,
        return Status::ERROR_DRM_SESSION_NOT_OPENED;
    }

    Mutex::Autolock lock(mSecurityLevelLock);
    std::map<std::vector<uint8_t>, SecurityLevel>::iterator itr =
            mSecurityLevel.find(sid);
    if (itr != mSecurityLevel.end()) {
@@ -694,6 +696,7 @@ Return<void> DrmPlugin::getMetrics(getMetrics_cb _hidl_cb) {
}

Return<void> DrmPlugin::getOfflineLicenseKeySetIds(getOfflineLicenseKeySetIds_cb _hidl_cb) {
    Mutex::Autolock lock(mFileHandleLock);
    std::vector<std::string> licenseNames = mFileHandle.ListLicenses();
    std::vector<KeySetId> keySetIds;
    if (mMockError != Status_V1_2::OK) {
@@ -714,6 +717,7 @@ Return<Status> DrmPlugin::removeOfflineLicense(const KeySetId& keySetId) {
        return toStatus_1_0(mMockError);
    }
    std::string licenseName(keySetId.begin(), keySetId.end());
    Mutex::Autolock lock(mFileHandleLock);
    if (mFileHandle.DeleteLicense(licenseName)) {
        return Status::OK;
    }
@@ -722,6 +726,8 @@ Return<Status> DrmPlugin::removeOfflineLicense(const KeySetId& keySetId) {

Return<void> DrmPlugin::getOfflineLicenseState(const KeySetId& keySetId,
        getOfflineLicenseState_cb _hidl_cb) {
    Mutex::Autolock lock(mFileHandleLock);

    std::string licenseName(keySetId.begin(), keySetId.end());
    DeviceFiles::LicenseState state;
    std::string license;
+5 −2
Original line number Diff line number Diff line
@@ -398,7 +398,8 @@ private:
    std::map<std::string, std::string> mStringProperties;
    std::map<std::string, std::vector<uint8_t> > mByteArrayProperties;
    std::map<std::string, std::vector<uint8_t> > mReleaseKeysMap;
    std::map<std::vector<uint8_t>, SecurityLevel> mSecurityLevel;
    std::map<std::vector<uint8_t>, SecurityLevel> mSecurityLevel
        GUARDED_BY(mSecurityLevelLock);
    sp<IDrmPluginListener> mListener;
    sp<IDrmPluginListener_V1_2> mListenerV1_2;
    SessionLibrary *mSessionLibrary;
@@ -416,8 +417,10 @@ private:
        mMockError = Status_V1_2::OK;
    }

    DeviceFiles mFileHandle;
    Mutex mSecureStopLock;
    Mutex mFileHandleLock;
    DeviceFiles mFileHandle GUARDED_BY(mFileHandleLock);
    Mutex mSecurityLevelLock;

    CLEARKEY_DISALLOW_COPY_AND_ASSIGN_AND_NEW(DrmPlugin);
};