diff --git a/libwvdrmengine/src_hidl/WVCryptoFactory.cpp b/libwvdrmengine/src_hidl/WVCryptoFactory.cpp index c5adc955..1cb08b2a 100644 --- a/libwvdrmengine/src_hidl/WVCryptoFactory.cpp +++ b/libwvdrmengine/src_hidl/WVCryptoFactory.cpp @@ -5,8 +5,9 @@ // //#define LOG_NDEBUG 0 -#define LOG_TAG "WVCdm" +#define LOG_TAG "WVCryptoFactory" #include +#include #include "WVCryptoFactory.h" @@ -31,6 +32,11 @@ Return WVCryptoFactory::createPlugin( const hidl_vec& initData, createPlugin_cb _hidl_cb) { + const auto& self = android::hardware::IPCThreadState::self(); + const char* sid = self->getCallingSid(); + sid = strstr(sid, "mediadrmserver") ? sid : (sid ? "app" : "nullptr"); + ALOGI("%s: calling sid [%s]", __func__, sid); + sp plugin; if (!isCryptoSchemeSupported(uuid.data())) { ALOGE("Widevine Drm HAL: failed to create crypto plugin, " \ diff --git a/libwvdrmengine/src_hidl/WVDrmFactory.cpp b/libwvdrmengine/src_hidl/WVDrmFactory.cpp index 560ba3f5..2c89e47d 100644 --- a/libwvdrmengine/src_hidl/WVDrmFactory.cpp +++ b/libwvdrmengine/src_hidl/WVDrmFactory.cpp @@ -5,8 +5,10 @@ // //#define LOG_NDEBUG 0 -#define LOG_TAG "WVCdm" +#define LOG_TAG "WVDrmFactory" +#include #include +#include #include "WVDrmFactory.h" @@ -63,6 +65,11 @@ Return WVDrmFactory::createPlugin( const hidl_string& appPackageName, createPlugin_cb _hidl_cb) { + const auto& self = android::hardware::IPCThreadState::self(); + const char* sid = self->getCallingSid(); + sid = strstr(sid, "mediadrmserver") ? sid : (sid ? "app" : "nullptr"); + ALOGI("%s: calling sid [%s]", __func__, sid); + sp plugin; if (!isCryptoSchemeSupported(uuid.data())) { ALOGE("Widevine Drm HAL: failed to create drm plugin, " \