Drm framework change based on new aidl interface cleanup
Test: atest CtsMediaDrmTestCases
Bug: 214410088
Change-Id: Ib80d8f86b069cd9569d71efc2eee94093581e845
diff --git a/drm/libmediadrm/interface/mediadrm/DrmUtils.h b/drm/libmediadrm/interface/mediadrm/DrmUtils.h
index 0368e43..66fe488 100644
--- a/drm/libmediadrm/interface/mediadrm/DrmUtils.h
+++ b/drm/libmediadrm/interface/mediadrm/DrmUtils.h
@@ -40,7 +40,7 @@
#include <vector>
#include <aidl/android/hardware/drm/LogMessage.h>
#include <aidl/android/hardware/drm/Status.h>
-
+#include <aidl/android/hardware/drm/IDrmFactory.h>
using namespace ::android::hardware::drm;
using ::android::hardware::hidl_vec;
@@ -48,7 +48,9 @@
using ::aidl::android::hardware::drm::LogPriority;
using ::aidl::android::hardware::drm::LogMessage;
+using ::aidl::android::hardware::drm::Uuid;
using StatusAidl = ::aidl::android::hardware::drm::Status;
+using IDrmFactoryAidl = ::aidl::android::hardware::drm::IDrmFactory;
namespace android {
@@ -161,6 +163,14 @@
obj.writeInt32(hasNewUsableKey);
}
+inline Uuid toAidlUuid(const uint8_t uuid[16]) {
+ Uuid uuidAidl;
+ for (int i = 0; i < 16; ++i) uuidAidl.uuid[i] = uuid[i];
+ return uuidAidl;
+}
+
+std::vector<std::shared_ptr<IDrmFactoryAidl>> makeDrmFactoriesAidl();
+
std::vector<sp<::V1_0::IDrmFactory>> MakeDrmFactories(const uint8_t uuid[16] = nullptr);
std::vector<sp<::V1_0::IDrmPlugin>> MakeDrmPlugins(const uint8_t uuid[16],