wv hidl factories: cleanup includes & logging

Addresses code review comments from http://go/wvgerrit/89383
* Use WVCdm LOG_TAG
* Cleanup includes

Bug: 134787536
Test: build
Change-Id: I2576127489205de62902d6c290f9293947976094
This commit is contained in:
Robert Shih
2019-11-11 16:31:00 -08:00
parent e083240191
commit 84061e93d6
2 changed files with 8 additions and 9 deletions

View File

@@ -5,9 +5,9 @@
//
//#define LOG_NDEBUG 0
#define LOG_TAG "WVCryptoFactory"
#include <utils/Log.h>
#define LOG_TAG "WVCdm"
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
#include "WVCryptoFactory.h"
@@ -34,8 +34,8 @@ Return<void> WVCryptoFactory::createPlugin(
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);
sid = sid ? (strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
ALOGI("[%s] calling %s", sid, __PRETTY_FUNCTION__);
sp<ICryptoPlugin> plugin;
if (!isCryptoSchemeSupported(uuid.data())) {

View File

@@ -5,10 +5,9 @@
//
//#define LOG_NDEBUG 0
#define LOG_TAG "WVDrmFactory"
#include <cstring>
#include <utils/Log.h>
#define LOG_TAG "WVCdm"
#include <hwbinder/IPCThreadState.h>
#include <utils/Log.h>
#include "WVDrmFactory.h"
@@ -67,8 +66,8 @@ Return<void> WVDrmFactory::createPlugin(
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);
sid = sid ? (strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
ALOGI("[%s] calling %s", sid, __PRETTY_FUNCTION__);
sp<IDrmPlugin> plugin;
if (!isCryptoSchemeSupported(uuid.data())) {