getOfflineLicenseKeySetIds() respects plugin security level.

[ Merge of http://go/wvgerrit/208155 ]

The MediaDrm plugin API getOfflineLicenseKeySetIds() was listing
both L1 and L3 offline licenses.  While this is generally acceptable,
apps might force set L3 via the setStringProperty(), which should
cause the DRM plugin to behave as if it is L3 only.

This change will cause the WVDrmPlugin list L3 only if the app had
set the security level to L3.

Bug: 357863269
Bug: 372105842
Test: DRM Compliance ATP via ABTD
Test: libwvdrmdrmplugin_hal_test on Oriole
Change-Id: I1a6e10b7eb880eef4ba36ed31b12ebfe8617f002
This commit is contained in:
Alex Dale
2024-10-08 15:29:47 -07:00
parent d4e11f1727
commit 26b888b094
3 changed files with 85 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ class WVDrmPlugin : public ::aidl::android::hardware::drm::BnDrmPlugin,
::ndk::ScopedAStatus getNumberOfSessions(
::aidl::android::hardware::drm::NumberOfSessions* _aidl_return) override;
::ndk::ScopedAStatus getOfflineLicenseKeySetIds(
std::vector<::aidl::android::hardware::drm::KeySetId>* _aidl_return)
std::vector<::aidl::android::hardware::drm::KeySetId>* keySetIds)
override;
::ndk::ScopedAStatus getOfflineLicenseState(
const ::aidl::android::hardware::drm::KeySetId& in_keySetId,