drm aidl client: dup hidl handle
Bug: 219754570
Test: atest GtsMediaTestCases
Change-Id: I76b750cbbd20cbe84afcc2740246bb9d5ddb2352
diff --git a/drm/libmediadrm/CryptoHalAidl.cpp b/drm/libmediadrm/CryptoHalAidl.cpp
index 37091dc..642264f 100644
--- a/drm/libmediadrm/CryptoHalAidl.cpp
+++ b/drm/libmediadrm/CryptoHalAidl.cpp
@@ -110,7 +110,7 @@
auto handle = buffer.secureMemory.getNativeHandle();
if (handle) {
aidldb.set<DestinationBufferAidl::Tag::secureMemory>(
- ::android::makeToAidl(handle));
+ ::android::dupToAidl(handle));
} else {
NativeHandleAidlCommon emptyhandle;
aidldb.set<DestinationBufferAidl::Tag::secureMemory>(