libwvhidl: implement API to get plugin logs

Bug: 162255728
Test: VtsHalDrmV1_4TargetTest
Change-Id: I333cb1ee2f25ae718e7f544f4a5f7ee50668041a
This commit is contained in:
Robert Shih
2021-01-21 07:08:30 -08:00
parent 83ef9081d1
commit 12995287fa
6 changed files with 38 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ namespace drm {
namespace V1_4 {
namespace widevine {
using android::hardware::drm::V1_2::widevine::toHidlVec;
using android::hardware::drm::V1_2::widevine::toVector;
using wvcdm::CdmDecryptionParametersV16;
using wvcdm::CdmDecryptionSample;
@@ -348,6 +349,12 @@ Status_V1_2 WVCryptoPlugin::attemptDecrypt(
}
}
Return<void> WVCryptoPlugin::getLogMessages(getLogMessages_cb _hidl_cb) {
const std::vector<wvcdm::LogMessage> &logs(wvcdm::g_logbuf.getLogs());
_hidl_cb(::drm::V1_4::Status::OK, toHidlVec<::drm::V1_4::LogMessage>(logs));
return Void();
}
} // namespace widevine
} // namespace V1_4
} // namespace drm