openSession_1_1 should return error for wrong security level
Currently, if requestedLevel is not the same as the current security level, openSession_1_1 still returns Status::OK, we should return an error status. Merged from http://go/wvgerrit/95507 Test: unit test adb shell LD_LIBRARY_PATH="/vendor/lib64" /data/nativetest/libwvdrmdrmplugin_hidl_test Bug: 150407669 Change-Id: I5673ac7bbe7a234ddd07bb9c145135486fb9e583
This commit is contained in:
@@ -402,7 +402,7 @@ TEST_F(WVDrmPluginTest, OpensSessions_1_1) {
|
||||
|
||||
plugin.openSession_1_1(android::hardware::drm::V1_1::SecurityLevel::SW_SECURE_CRYPTO,
|
||||
[&](Status status, hidl_vec<uint8_t> hSessionId) {
|
||||
ASSERT_EQ(Status::OK, status);
|
||||
ASSERT_EQ(Status::ERROR_DRM_INVALID_STATE, status);
|
||||
sessionId.clear();
|
||||
sessionId.assign(hSessionId.data(), hSessionId.data() + hSessionId.size());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user