Revert "Enable loading of treble-based plugins"
bug:35329920
Tests: Verfied playback on Ryu with Play Movies in combination with
ag/1907708, ag/1909159
This reverts commit fbf365037014e81711611384aeee9469590210f6.
Change-Id: I4a35a329b24e4cd9efcff4fe84e9d8901c714d57
diff --git a/drm/1.0/default/DrmFactory.h b/drm/1.0/default/DrmFactory.h
index 2e71624..a008844 100644
--- a/drm/1.0/default/DrmFactory.h
+++ b/drm/1.0/default/DrmFactory.h
@@ -42,45 +42,18 @@
virtual ~DrmFactory() {}
// Methods from ::android::hardware::drm::V1_0::IDrmFactory follow.
+
Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
override;
- Return<bool> isContentTypeSupported(const hidl_string& mimeType)
+ Return<bool> isContentTypeSupported(const hidl_string &mimeType)
override;
Return<void> createPlugin(const hidl_array<uint8_t, 16>& uuid,
const hidl_string& appPackageName, createPlugin_cb _hidl_cb) override;
private:
- template <typename L> Return<bool> isCryptoSchemeSupported(
- const L& loader, const hidl_array<uint8_t, 16>& uuid) {
- for (size_t i = 0; i < loader.factoryCount(); i++) {
- if (loader.getFactory(i)->isCryptoSchemeSupported(uuid.data())) {
- return true;
- }
- }
- return false;
- }
-
- template <typename L, typename S> Return<bool> isContentTypeSupported(
- const L& loader, const hidl_string& mimeType) {
- for (size_t i = 0; i < loader.factoryCount(); i++) {
- if (loader.getFactory(i)->isContentTypeSupported(S(mimeType))) {
- return true;
- }
- }
- return false;
- }
-
- sp<IDrmPlugin> createTreblePlugin(const hidl_array<uint8_t, 16>& uuid,
- const hidl_string& appPackageName);
- sp<IDrmPlugin> createLegacyPlugin(const hidl_array<uint8_t, 16>& uuid);
-
- typedef android::PluginLoader<IDrmFactory> PluginLoader;
- PluginLoader trebleLoader;
-
- typedef android::PluginLoader<android::DrmFactory> LegacyLoader;
- LegacyLoader legacyLoader;
+ android::PluginLoader<android::DrmFactory> loader;
DrmFactory(const DrmFactory &) = delete;
void operator=(const DrmFactory &) = delete;