wv hidl: setRequestingSid to true

HALs need to getCallingSid to verify clients.

[ Merge of http://go/wvgerrit/89123 ]

Bug: 134787536
Test: log calling sid
Change-Id: I9cfbddfc274457a6802d9c8f37470d656771acc6
This commit is contained in:
Robert Shih
2019-11-05 15:43:26 -08:00
parent ea539673a4
commit bb093eee1e
4 changed files with 10 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ Return<void> WVDrmFactory::createPlugin(
const hidl_string& appPackageName,
createPlugin_cb _hidl_cb) {
WVDrmPlugin *plugin = NULL;
sp<IDrmPlugin> plugin;
if (!isCryptoSchemeSupported(uuid.data())) {
ALOGE("Widevine Drm HAL: failed to create drm plugin, " \
"invalid crypto scheme");
@@ -80,6 +80,7 @@ Return<void> WVDrmFactory::createPlugin(
plugin = new WVDrmPlugin(getCDM(), appPackageName.c_str(),
&sOemCryptoInterface, areSpoidsEnabled());
android::hardware::setRequestingSid(plugin, true);
_hidl_cb(Status::OK, plugin);
return Void();
}