[ Merged of http://go/wvgerrit/39766 ] The security level (software/hardware, decryption/decode) in the policy that specified how the key was to be used was not being respected for L3. Playback would either continue or a vendor specific error would be thrown. If the device cannot use the key as permitted by the policy CryptoException#ERROR_INSUFFICIENT_OUTPUT_PROTECTION will be thrown. Bug: 31913737 Bug: 31913439 Test: WV unit/integration tests Test: Playback using playmovies and netflix. Cast playback using playmovies. Change-Id: If25735ab0f789108431115623cb236687c5ef818
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
// Copyright 2017 Google Inc. All Rights Reserved.
|
|
|
|
#include "ami_adapter.h"
|
|
|
|
#include <log.h>
|
|
|
|
namespace wvcdm {
|
|
|
|
AmiAdapter::AmiAdapter() :
|
|
analytics_item_("widevine") {
|
|
analytics_item_.generateSessionID();
|
|
}
|
|
|
|
AmiAdapter::AmiAdapter(int64_t parent) :
|
|
analytics_item_("widevine") {
|
|
analytics_item_.generateSessionID();
|
|
analytics_item_.setInt64("/drm/widevine/parent/external", parent);
|
|
}
|
|
|
|
AmiAdapter::~AmiAdapter() {
|
|
analytics_item_.selfrecord();
|
|
}
|
|
|
|
void AmiAdapter::UpdateString(const std::string& metric_id,
|
|
const std::string& value) {
|
|
analytics_item_.setCString(metric_id.c_str(), value.c_str());
|
|
LOGV(
|
|
"AmiAdapter (%lld) %s : %s",
|
|
analytics_item_.getSessionID(),
|
|
metric_id.c_str(),
|
|
value.c_str());
|
|
}
|
|
|
|
void AmiAdapter::UpdateInt32(const std::string& metric_id,
|
|
int32_t value) {
|
|
analytics_item_.setInt32(metric_id.c_str(), value);
|
|
LOGV(
|
|
"AmiAdapter (%lld) %s : %ld",
|
|
analytics_item_.getSessionID(),
|
|
metric_id.c_str(),
|
|
value);
|
|
}
|
|
|
|
void AmiAdapter::UpdateInt64(const std::string& metric_id,
|
|
int64_t value) {
|
|
analytics_item_.setInt64(metric_id.c_str(), value);
|
|
LOGV(
|
|
"AmiAdapter (%lld) %s : %lld",
|
|
analytics_item_.getSessionID(),
|
|
metric_id.c_str(),
|
|
value);
|
|
}
|
|
|
|
void AmiAdapter::UpdateDouble(const std::string& metric_id,
|
|
double value) {
|
|
analytics_item_.setDouble(metric_id.c_str(), value);
|
|
LOGV(
|
|
"AmiAdapter (%lld) %s : %f",
|
|
analytics_item_.getSessionID(),
|
|
metric_id.c_str(),
|
|
value);
|
|
}
|
|
|
|
} // namespace wvcdm
|