Merge "Fix OfflineLicenseTest not provisioned" into android13-tests-dev am: 6da64e6ba2 am: 0c20acbb6c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2379310

Change-Id: I12b2fcdeb934d0943b1d76d439b76e71da9c1130
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kyle Zhang 2023-01-25 19:36:13 +00:00 committed by Automerger Merge Worker
commit 0469f21a39

View file

@ -198,6 +198,18 @@ TEST_P(DrmHalTest, OfflineLicenseTest) {
EXPECT_NE(keySetId, keySetId2.keySetId);
}
for (auto level : {kHwSecureAll, kSwSecureCrypto}) {
Status err = Status::OK;
auto sid = openSession(level, &err);
if (err == Status::OK) {
closeSession(sid);
} else if (err == Status::ERROR_DRM_CANNOT_HANDLE) {
continue;
} else {
EXPECT_EQ(Status::ERROR_DRM_NOT_PROVISIONED, err);
provision();
}
}
ret = drmPlugin->removeOfflineLicense({keySetId});
EXPECT_TXN(ret);
EXPECT_EQ(Status::BAD_VALUE, DrmErr(ret));