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

Commit 72e618e6 authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "drm@1.2 vts: close session before modifying offline licenses" into sc-dev

parents 95e37e1d 1731084b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ void checkKeySetIdState(Status status, OfflineLicenseState state) {
TEST_P(DrmHalTest, OfflineLicenseTest) {
    auto sessionId = openSession();
    hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
    closeSession(sessionId);

    auto res = drmPlugin->getOfflineLicenseKeySetIds(
            [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
@@ -201,8 +202,6 @@ TEST_P(DrmHalTest, OfflineLicenseTest) {

    err = drmPlugin->removeOfflineLicense(keySetId);
    EXPECT_EQ(Status::BAD_VALUE, err);

    closeSession(sessionId);
}

/**
@@ -212,6 +211,8 @@ TEST_P(DrmHalTest, OfflineLicenseStateTest) {
    auto sessionId = openSession();
    DrmHalVTSVendorModule_V1::ContentConfiguration content = getContent(KeyType::OFFLINE);
    hidl_vec<uint8_t> keySetId = loadKeys(sessionId, content, KeyType::OFFLINE);
    closeSession(sessionId);

    drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<Status::OK, OfflineLicenseState::USABLE>);

    hidl_vec<uint8_t> keyRequest = getKeyRequest(keySetId, content, KeyType::RELEASE);
@@ -226,7 +227,6 @@ TEST_P(DrmHalTest, OfflineLicenseStateTest) {

    provideKeyResponse(keySetId, keyResponse);
    drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<Status::BAD_VALUE, OfflineLicenseState::UNKNOWN>);
    closeSession(sessionId);
}

/**