blob: 58110d41ad47e23a8ac397d648ffc5bbcd52d244 [file] [log] [blame]
Jeff Tinkera53d6552017-01-20 00:31:46 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//#define LOG_NDEBUG 0
18#define LOG_TAG "CryptoHal"
19#include <utils/Log.h>
Jeff Tinkera53d6552017-01-20 00:31:46 -080020
21#include <android/hardware/drm/1.0/types.h>
Steven Moreland7dcb4db2019-05-13 13:10:51 -070022#include <android/hidl/manager/1.2/IServiceManager.h>
Jeff Tinkera53d6552017-01-20 00:31:46 -080023#include <binder/IMemory.h>
Steven Moreland7dcb4db2019-05-13 13:10:51 -070024#include <hidl/ServiceManagement.h>
Jeff Tinker7d2c6e82018-02-16 16:14:59 -080025#include <hidlmemory/FrameworkUtils.h>
Jeff Tinkera53d6552017-01-20 00:31:46 -080026#include <media/hardware/CryptoAPI.h>
27#include <media/stagefright/foundation/ADebug.h>
28#include <media/stagefright/foundation/AString.h>
29#include <media/stagefright/foundation/hexdump.h>
30#include <media/stagefright/MediaErrors.h>
Jeff Tinker7d2c6e82018-02-16 16:14:59 -080031#include <mediadrm/CryptoHal.h>
32
Jeff Tinkerb8684f32018-12-12 08:41:31 -080033using drm::V1_0::BufferType;
34using drm::V1_0::DestinationBuffer;
35using drm::V1_0::ICryptoFactory;
36using drm::V1_0::ICryptoPlugin;
37using drm::V1_0::Mode;
38using drm::V1_0::Pattern;
39using drm::V1_0::SharedBuffer;
40using drm::V1_0::Status;
41using drm::V1_0::SubSample;
Jeff Tinkera53d6552017-01-20 00:31:46 -080042
Jeff Tinkera53d6552017-01-20 00:31:46 -080043using ::android::hardware::hidl_array;
44using ::android::hardware::hidl_handle;
45using ::android::hardware::hidl_memory;
46using ::android::hardware::hidl_string;
47using ::android::hardware::hidl_vec;
48using ::android::hardware::Return;
49using ::android::hardware::Void;
50using ::android::sp;
51
Jeff Tinkerb8684f32018-12-12 08:41:31 -080052typedef drm::V1_2::Status Status_V1_2;
Jeff Tinkera53d6552017-01-20 00:31:46 -080053
54namespace android {
55
56static status_t toStatusT(Status status) {
57 switch (status) {
58 case Status::OK:
59 return OK;
60 case Status::ERROR_DRM_NO_LICENSE:
61 return ERROR_DRM_NO_LICENSE;
62 case Status::ERROR_DRM_LICENSE_EXPIRED:
63 return ERROR_DRM_LICENSE_EXPIRED;
64 case Status::ERROR_DRM_RESOURCE_BUSY:
65 return ERROR_DRM_RESOURCE_BUSY;
66 case Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION:
67 return ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION;
68 case Status::ERROR_DRM_SESSION_NOT_OPENED:
69 return ERROR_DRM_SESSION_NOT_OPENED;
70 case Status::ERROR_DRM_CANNOT_HANDLE:
71 return ERROR_DRM_CANNOT_HANDLE;
Jeff Tinkerd0cb8312017-03-15 11:17:00 -070072 case Status::ERROR_DRM_DECRYPT:
73 return ERROR_DRM_DECRYPT;
Jeff Tinkera53d6552017-01-20 00:31:46 -080074 default:
75 return UNKNOWN_ERROR;
76 }
77}
78
Jeff Tinkerb8684f32018-12-12 08:41:31 -080079static status_t toStatusT_1_2(Status_V1_2 status) {
80 switch (status) {
81 case Status_V1_2::ERROR_DRM_SESSION_LOST_STATE:
82 return ERROR_DRM_SESSION_LOST_STATE;;
83 case Status_V1_2::ERROR_DRM_FRAME_TOO_LARGE:
84 return ERROR_DRM_FRAME_TOO_LARGE;
85 case Status_V1_2::ERROR_DRM_INSUFFICIENT_SECURITY:
86 return ERROR_DRM_INSUFFICIENT_SECURITY;
87 default:
88 return toStatusT(static_cast<Status>(status));
89 }
90}
Jeff Tinkera53d6552017-01-20 00:31:46 -080091
92static hidl_vec<uint8_t> toHidlVec(const Vector<uint8_t> &vector) {
93 hidl_vec<uint8_t> vec;
94 vec.setToExternal(const_cast<uint8_t *>(vector.array()), vector.size());
95 return vec;
96}
97
98static hidl_vec<uint8_t> toHidlVec(const void *ptr, size_t size) {
99 hidl_vec<uint8_t> vec;
100 vec.resize(size);
101 memcpy(vec.data(), ptr, size);
102 return vec;
103}
104
105static hidl_array<uint8_t, 16> toHidlArray16(const uint8_t *ptr) {
106 if (!ptr) {
107 return hidl_array<uint8_t, 16>();
108 }
109 return hidl_array<uint8_t, 16>(ptr);
110}
111
112
Jeff Tinkera53d6552017-01-20 00:31:46 -0800113static String8 toString8(hidl_string hString) {
114 return String8(hString.c_str());
115}
116
117
118CryptoHal::CryptoHal()
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800119 : mFactories(makeCryptoFactories()),
120 mInitCheck((mFactories.size() == 0) ? ERROR_UNSUPPORTED : NO_INIT),
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700121 mNextBufferId(0),
122 mHeapSeqNum(0) {
Jeff Tinkera53d6552017-01-20 00:31:46 -0800123}
124
125CryptoHal::~CryptoHal() {
126}
127
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800128Vector<sp<ICryptoFactory>> CryptoHal::makeCryptoFactories() {
129 Vector<sp<ICryptoFactory>> factories;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800130
Steven Moreland7dcb4db2019-05-13 13:10:51 -0700131 auto manager = hardware::defaultServiceManager1_2();
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800132 if (manager != NULL) {
Steven Moreland7dcb4db2019-05-13 13:10:51 -0700133 manager->listManifestByInterface(drm::V1_0::ICryptoFactory::descriptor,
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800134 [&factories](const hidl_vec<hidl_string> &registered) {
135 for (const auto &instance : registered) {
Jeff Tinkere307dc42018-02-11 19:53:54 +0000136 auto factory = drm::V1_0::ICryptoFactory::getService(instance);
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800137 if (factory != NULL) {
Jeff Tinkere307dc42018-02-11 19:53:54 +0000138 ALOGD("found drm@1.0 ICryptoFactory %s", instance.c_str());
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800139 factories.push_back(factory);
Jeff Tinkere307dc42018-02-11 19:53:54 +0000140 }
141 }
142 }
143 );
Steven Moreland7dcb4db2019-05-13 13:10:51 -0700144 manager->listManifestByInterface(drm::V1_1::ICryptoFactory::descriptor,
Jeff Tinkere307dc42018-02-11 19:53:54 +0000145 [&factories](const hidl_vec<hidl_string> &registered) {
146 for (const auto &instance : registered) {
147 auto factory = drm::V1_1::ICryptoFactory::getService(instance);
148 if (factory != NULL) {
149 ALOGD("found drm@1.1 ICryptoFactory %s", instance.c_str());
150 factories.push_back(factory);
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800151 }
152 }
153 }
154 );
Jeff Tinkera53d6552017-01-20 00:31:46 -0800155 }
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800156
157 if (factories.size() == 0) {
158 // must be in passthrough mode, load the default passthrough service
Jeff Tinkere309b222017-04-05 08:01:28 -0700159 auto passthrough = ICryptoFactory::getService();
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800160 if (passthrough != NULL) {
Jeff Tinkere307dc42018-02-11 19:53:54 +0000161 ALOGI("makeCryptoFactories: using default passthrough crypto instance");
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800162 factories.push_back(passthrough);
163 } else {
164 ALOGE("Failed to find any crypto factories");
165 }
166 }
167 return factories;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800168}
169
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800170sp<ICryptoPlugin> CryptoHal::makeCryptoPlugin(const sp<ICryptoFactory>& factory,
171 const uint8_t uuid[16], const void *initData, size_t initDataSize) {
Jeff Tinkera53d6552017-01-20 00:31:46 -0800172
173 sp<ICryptoPlugin> plugin;
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800174 Return<void> hResult = factory->createPlugin(toHidlArray16(uuid),
Jeff Tinkera53d6552017-01-20 00:31:46 -0800175 toHidlVec(initData, initDataSize),
176 [&](Status status, const sp<ICryptoPlugin>& hPlugin) {
177 if (status != Status::OK) {
178 ALOGE("Failed to make crypto plugin");
179 return;
180 }
181 plugin = hPlugin;
182 }
183 );
184 return plugin;
185}
186
187
188status_t CryptoHal::initCheck() const {
189 return mInitCheck;
190}
191
192
193bool CryptoHal::isCryptoSchemeSupported(const uint8_t uuid[16]) {
194 Mutex::Autolock autoLock(mLock);
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800195
196 for (size_t i = 0; i < mFactories.size(); i++) {
197 if (mFactories[i]->isCryptoSchemeSupported(uuid)) {
198 return true;
199 }
Jeff Tinkera53d6552017-01-20 00:31:46 -0800200 }
201 return false;
202}
203
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800204status_t CryptoHal::createPlugin(const uint8_t uuid[16], const void *data,
205 size_t size) {
Jeff Tinkera53d6552017-01-20 00:31:46 -0800206 Mutex::Autolock autoLock(mLock);
207
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800208 for (size_t i = 0; i < mFactories.size(); i++) {
209 if (mFactories[i]->isCryptoSchemeSupported(uuid)) {
210 mPlugin = makeCryptoPlugin(mFactories[i], uuid, data, size);
Jeff Tinkerb8684f32018-12-12 08:41:31 -0800211 if (mPlugin != NULL) {
212 mPluginV1_2 = drm::V1_2::ICryptoPlugin::castFrom(mPlugin);
213 }
Jeff Tinkerabeb36a2017-02-17 09:42:46 -0800214 }
215 }
Jeff Tinkera53d6552017-01-20 00:31:46 -0800216
217 if (mPlugin == NULL) {
218 mInitCheck = ERROR_UNSUPPORTED;
219 } else {
220 mInitCheck = OK;
221 }
222
223 return mInitCheck;
224}
225
226status_t CryptoHal::destroyPlugin() {
227 Mutex::Autolock autoLock(mLock);
228
229 if (mInitCheck != OK) {
230 return mInitCheck;
231 }
232
233 mPlugin.clear();
Jeff Tinkerb8684f32018-12-12 08:41:31 -0800234 mPluginV1_2.clear();
Jeff Tinkera53d6552017-01-20 00:31:46 -0800235 return OK;
236}
237
238bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const {
239 Mutex::Autolock autoLock(mLock);
240
241 if (mInitCheck != OK) {
Jeff Tinkercca23772018-05-07 11:41:56 -0700242 return false;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800243 }
244
Jeff Tinkercca23772018-05-07 11:41:56 -0700245 Return<bool> hResult = mPlugin->requiresSecureDecoderComponent(hidl_string(mime));
246 if (!hResult.isOk()) {
247 return false;
248 }
249 return hResult;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800250}
251
252
253/**
254 * If the heap base isn't set, get the heap base from the IMemory
255 * and send it to the HAL so it can map a remote heap of the same
256 * size. Once the heap base is established, shared memory buffers
257 * are sent by providing an offset into the heap and a buffer size.
258 */
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700259int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) {
Steven Moreland65366062017-10-05 11:34:01 -0700260 using ::android::hardware::fromHeap;
261 using ::android::hardware::HidlMemory;
262
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700263 if (heap == NULL) {
264 ALOGE("setHeapBase(): heap is NULL");
265 return -1;
266 }
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700267
268 Mutex::Autolock autoLock(mLock);
269
270 int32_t seqNum = mHeapSeqNum++;
Steven Moreland65366062017-10-05 11:34:01 -0700271 sp<HidlMemory> hidlMemory = fromHeap(heap);
Jeff Tinkerb1f8c802018-04-19 16:23:21 -0700272 mHeapBases.add(seqNum, HeapBase(mNextBufferId, heap->getSize()));
Steven Moreland65366062017-10-05 11:34:01 -0700273 Return<void> hResult = mPlugin->setSharedBufferBase(*hidlMemory, mNextBufferId++);
Jeff Tinker3cb53162017-02-16 12:06:32 -0800274 ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed");
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700275 return seqNum;
Jeff Tinker3cb53162017-02-16 12:06:32 -0800276}
277
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700278void CryptoHal::clearHeapBase(int32_t seqNum) {
279 Mutex::Autolock autoLock(mLock);
280
Jeff Tinker0db0fa12018-05-22 16:55:57 -0700281 /*
282 * Clear the remote shared memory mapping by setting the shared
283 * buffer base to a null hidl_memory.
284 *
285 * TODO: Add a releaseSharedBuffer method in a future DRM HAL
286 * API version to make this explicit.
287 */
Jeff Tinker20795c72018-05-30 18:20:09 -0700288 ssize_t index = mHeapBases.indexOfKey(seqNum);
289 if (index >= 0) {
290 if (mPlugin != NULL) {
291 uint32_t bufferId = mHeapBases[index].getBufferId();
292 Return<void> hResult = mPlugin->setSharedBufferBase(hidl_memory(), bufferId);
293 ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed");
294 }
295 mHeapBases.removeItem(seqNum);
296 }
Chong Zhangd07c9272017-03-28 11:02:06 -0700297}
298
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700299status_t CryptoHal::toSharedBuffer(const sp<IMemory>& memory, int32_t seqNum, ::SharedBuffer* buffer) {
Jeff Tinker3cb53162017-02-16 12:06:32 -0800300 ssize_t offset;
301 size_t size;
302
Jeff Tinker33f03632019-05-03 15:10:56 -0700303 if (memory == NULL || buffer == NULL) {
Jeff Tinker3cb53162017-02-16 12:06:32 -0800304 return UNEXPECTED_NULL;
305 }
306
307 sp<IMemoryHeap> heap = memory->getMemory(&offset, &size);
308 if (heap == NULL) {
309 return UNEXPECTED_NULL;
310 }
311
Jeff Tinkerb1f8c802018-04-19 16:23:21 -0700312 // memory must be in one of the heaps that have been set
313 if (mHeapBases.indexOfKey(seqNum) < 0) {
314 return UNKNOWN_ERROR;
315 }
Jeff Tinker3cb53162017-02-16 12:06:32 -0800316
Jeff Tinkerb1f8c802018-04-19 16:23:21 -0700317 // heap must be the same size as the one that was set in setHeapBase
318 if (mHeapBases.valueFor(seqNum).getSize() != heap->getSize()) {
319 android_errorWriteLog(0x534e4554, "76221123");
320 return UNKNOWN_ERROR;
321 }
322
323 // memory must be within the address space of the heap
Ytai Ben-Tsvi7dd39722019-09-05 15:14:30 -0700324 // TODO: Using unsecurePointer() has some associated security pitfalls
325 // (see declaration for details).
326 // Either document why it is safe in this case or address the
327 // issue (e.g. by copying).
328 if (memory->unsecurePointer() != static_cast<uint8_t *>(heap->getBase()) + memory->offset() ||
Jeff Tinkerb1f8c802018-04-19 16:23:21 -0700329 heap->getSize() < memory->offset() + memory->size() ||
330 SIZE_MAX - memory->offset() < memory->size()) {
331 android_errorWriteLog(0x534e4554, "76221123");
332 return UNKNOWN_ERROR;
333 }
334
335 buffer->bufferId = mHeapBases.valueFor(seqNum).getBufferId();
Jeff Tinker3cb53162017-02-16 12:06:32 -0800336 buffer->offset = offset >= 0 ? offset : 0;
337 buffer->size = size;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800338 return OK;
339}
340
341ssize_t CryptoHal::decrypt(const uint8_t keyId[16], const uint8_t iv[16],
342 CryptoPlugin::Mode mode, const CryptoPlugin::Pattern &pattern,
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700343 const ICrypto::SourceBuffer &source, size_t offset,
Jeff Tinkera53d6552017-01-20 00:31:46 -0800344 const CryptoPlugin::SubSample *subSamples, size_t numSubSamples,
345 const ICrypto::DestinationBuffer &destination, AString *errorDetailMsg) {
346 Mutex::Autolock autoLock(mLock);
347
348 if (mInitCheck != OK) {
349 return mInitCheck;
350 }
351
Jeff Tinkera53d6552017-01-20 00:31:46 -0800352 Mode hMode;
353 switch(mode) {
354 case CryptoPlugin::kMode_Unencrypted:
355 hMode = Mode::UNENCRYPTED ;
356 break;
357 case CryptoPlugin::kMode_AES_CTR:
358 hMode = Mode::AES_CTR;
359 break;
360 case CryptoPlugin::kMode_AES_WV:
361 hMode = Mode::AES_CBC_CTS;
362 break;
363 case CryptoPlugin::kMode_AES_CBC:
364 hMode = Mode::AES_CBC;
365 break;
366 default:
367 return UNKNOWN_ERROR;
368 }
369
370 Pattern hPattern;
371 hPattern.encryptBlocks = pattern.mEncryptBlocks;
372 hPattern.skipBlocks = pattern.mSkipBlocks;
373
374 std::vector<SubSample> stdSubSamples;
375 for (size_t i = 0; i < numSubSamples; i++) {
376 SubSample subSample;
377 subSample.numBytesOfClearData = subSamples[i].mNumBytesOfClearData;
378 subSample.numBytesOfEncryptedData = subSamples[i].mNumBytesOfEncryptedData;
379 stdSubSamples.push_back(subSample);
380 }
381 auto hSubSamples = hidl_vec<SubSample>(stdSubSamples);
382
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700383 int32_t heapSeqNum = source.mHeapSeqNum;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800384 bool secure;
385 ::DestinationBuffer hDestination;
386 if (destination.mType == kDestinationTypeSharedMemory) {
387 hDestination.type = BufferType::SHARED_MEMORY;
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700388 status_t status = toSharedBuffer(destination.mSharedMemory, heapSeqNum,
Jeff Tinker3cb53162017-02-16 12:06:32 -0800389 &hDestination.nonsecureMemory);
390 if (status != OK) {
391 return status;
392 }
Jeff Tinkera53d6552017-01-20 00:31:46 -0800393 secure = false;
Jeff Tinker24420472018-01-11 17:46:16 -0800394 } else if (destination.mType == kDestinationTypeNativeHandle) {
Jeff Tinkera53d6552017-01-20 00:31:46 -0800395 hDestination.type = BufferType::NATIVE_HANDLE;
396 hDestination.secureMemory = hidl_handle(destination.mHandle);
397 secure = true;
Jeff Tinker24420472018-01-11 17:46:16 -0800398 } else {
399 android_errorWriteLog(0x534e4554, "70526702");
400 return UNKNOWN_ERROR;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800401 }
402
Jeff Tinker3cb53162017-02-16 12:06:32 -0800403 ::SharedBuffer hSource;
Chong Zhang6dcab2b2017-03-28 14:18:27 -0700404 status_t status = toSharedBuffer(source.mSharedMemory, heapSeqNum, &hSource);
Jeff Tinker3cb53162017-02-16 12:06:32 -0800405 if (status != OK) {
406 return status;
407 }
Jeff Tinkera53d6552017-01-20 00:31:46 -0800408
409 status_t err = UNKNOWN_ERROR;
410 uint32_t bytesWritten = 0;
411
Jeff Tinkerb8684f32018-12-12 08:41:31 -0800412 Return<void> hResult;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800413
Jeff Tinkerb8684f32018-12-12 08:41:31 -0800414 if (mPluginV1_2 != NULL) {
415 hResult = mPluginV1_2->decrypt_1_2(secure, toHidlArray16(keyId), toHidlArray16(iv),
416 hMode, hPattern, hSubSamples, hSource, offset, hDestination,
417 [&](Status_V1_2 status, uint32_t hBytesWritten, hidl_string hDetailedError) {
418 if (status == Status_V1_2::OK) {
419 bytesWritten = hBytesWritten;
420 *errorDetailMsg = toString8(hDetailedError);
421 }
422 err = toStatusT_1_2(status);
423 }
424 );
425 } else {
426 hResult = mPlugin->decrypt(secure, toHidlArray16(keyId), toHidlArray16(iv),
427 hMode, hPattern, hSubSamples, hSource, offset, hDestination,
428 [&](Status status, uint32_t hBytesWritten, hidl_string hDetailedError) {
429 if (status == Status::OK) {
430 bytesWritten = hBytesWritten;
431 *errorDetailMsg = toString8(hDetailedError);
432 }
433 err = toStatusT(status);
434 }
435 );
Jeff Tinkera53d6552017-01-20 00:31:46 -0800436 }
437
Jeff Tinkerb8684f32018-12-12 08:41:31 -0800438 err = hResult.isOk() ? err : DEAD_OBJECT;
Jeff Tinkera53d6552017-01-20 00:31:46 -0800439 if (err == OK) {
440 return bytesWritten;
441 }
442 return err;
443}
444
445void CryptoHal::notifyResolution(uint32_t width, uint32_t height) {
446 Mutex::Autolock autoLock(mLock);
447
448 if (mInitCheck != OK) {
449 return;
450 }
451
452 mPlugin->notifyResolution(width, height);
453}
454
455status_t CryptoHal::setMediaDrmSession(const Vector<uint8_t> &sessionId) {
456 Mutex::Autolock autoLock(mLock);
457
458 if (mInitCheck != OK) {
459 return mInitCheck;
460 }
461
462 return toStatusT(mPlugin->setMediaDrmSession(toHidlVec(sessionId)));
463}
464
465} // namespace android