misc wv aidl bug fix to pass vts
* handle default security level * init ScopedAStatus before sending events Bug: 205845199 Test: atest VtsAidlHalDrmTargetTest Change-Id: Ie72d837bb2b7caa1da2721262b76bd47d5bdab03
This commit is contained in:
@@ -279,7 +279,8 @@ SecurityLevel WVDrmPlugin::mapSecurityLevel(const std::string& level) {
|
||||
}
|
||||
|
||||
if (wvcdm::QUERY_VALUE_SECURITY_LEVEL_L3 == native_security_level &&
|
||||
in_securityLevel >= SecurityLevel::SW_SECURE_DECODE) {
|
||||
in_securityLevel >= SecurityLevel::SW_SECURE_DECODE &&
|
||||
in_securityLevel != SecurityLevel::DEFAULT) {
|
||||
*_aidl_return = sessionId;
|
||||
return toNdkScopedAStatus(Status::ERROR_DRM_CANNOT_HANDLE);
|
||||
}
|
||||
@@ -1704,7 +1705,7 @@ void WVDrmPlugin::sendEvent(
|
||||
|
||||
void WVDrmPlugin::sendExpirationUpdate(const vector<uint8_t>& in_sessionId,
|
||||
int64_t in_expiryTimeInMS) {
|
||||
::ndk::ScopedAStatus err;
|
||||
::ndk::ScopedAStatus err = ::ndk::ScopedAStatus::ok();
|
||||
if (mListener != nullptr) {
|
||||
err = mListener->onExpirationUpdate(in_sessionId, in_expiryTimeInMS);
|
||||
} else {
|
||||
@@ -1720,7 +1721,7 @@ void WVDrmPlugin::sendKeysChange(
|
||||
const vector<uint8_t>& in_sessionId,
|
||||
const vector<::aidl::android::hardware::drm::KeyStatus>& in_keyStatusList,
|
||||
bool in_hasNewUsableKey) {
|
||||
::ndk::ScopedAStatus err;
|
||||
::ndk::ScopedAStatus err = ::ndk::ScopedAStatus::ok();
|
||||
if (mListener != nullptr) {
|
||||
err = mListener->onKeysChange(in_sessionId, in_keyStatusList,
|
||||
in_hasNewUsableKey);
|
||||
@@ -1734,7 +1735,7 @@ void WVDrmPlugin::sendKeysChange(
|
||||
}
|
||||
|
||||
void WVDrmPlugin::sendSessionLostState(const vector<uint8_t>& in_sessionId) {
|
||||
::ndk::ScopedAStatus err;
|
||||
::ndk::ScopedAStatus err = ::ndk::ScopedAStatus::ok();
|
||||
if (mListener != nullptr) {
|
||||
err = mListener->onSessionLostState(in_sessionId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user