wv hidl factories: getCallingSid logging
[ Merge of http://go/wvgerrit/89383 ] Bug: 134787536 Test: check calling sid in logs Change-Id: If47ccaf9296a157b72181fb2bd00318bb957c15c
This commit is contained in:
@@ -5,8 +5,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//#define LOG_NDEBUG 0
|
//#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "WVCdm"
|
#define LOG_TAG "WVCryptoFactory"
|
||||||
#include <utils/Log.h>
|
#include <utils/Log.h>
|
||||||
|
#include <hwbinder/IPCThreadState.h>
|
||||||
|
|
||||||
#include "WVCryptoFactory.h"
|
#include "WVCryptoFactory.h"
|
||||||
|
|
||||||
@@ -31,6 +32,11 @@ Return<void> WVCryptoFactory::createPlugin(
|
|||||||
const hidl_vec<uint8_t>& initData,
|
const hidl_vec<uint8_t>& initData,
|
||||||
createPlugin_cb _hidl_cb) {
|
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<ICryptoPlugin> plugin;
|
sp<ICryptoPlugin> plugin;
|
||||||
if (!isCryptoSchemeSupported(uuid.data())) {
|
if (!isCryptoSchemeSupported(uuid.data())) {
|
||||||
ALOGE("Widevine Drm HAL: failed to create crypto plugin, " \
|
ALOGE("Widevine Drm HAL: failed to create crypto plugin, " \
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//#define LOG_NDEBUG 0
|
//#define LOG_NDEBUG 0
|
||||||
#define LOG_TAG "WVCdm"
|
#define LOG_TAG "WVDrmFactory"
|
||||||
|
#include <cstring>
|
||||||
#include <utils/Log.h>
|
#include <utils/Log.h>
|
||||||
|
#include <hwbinder/IPCThreadState.h>
|
||||||
|
|
||||||
#include "WVDrmFactory.h"
|
#include "WVDrmFactory.h"
|
||||||
|
|
||||||
@@ -63,6 +65,11 @@ Return<void> WVDrmFactory::createPlugin(
|
|||||||
const hidl_string& appPackageName,
|
const hidl_string& appPackageName,
|
||||||
createPlugin_cb _hidl_cb) {
|
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<IDrmPlugin> plugin;
|
sp<IDrmPlugin> plugin;
|
||||||
if (!isCryptoSchemeSupported(uuid.data())) {
|
if (!isCryptoSchemeSupported(uuid.data())) {
|
||||||
ALOGE("Widevine Drm HAL: failed to create drm plugin, " \
|
ALOGE("Widevine Drm HAL: failed to create drm plugin, " \
|
||||||
|
|||||||
Reference in New Issue
Block a user