Restore Lost Formatting Fixes
Due to merges happening out-of-order, some formatting fixes that had previously been merged from the Widevine repository were subsequently wiped out by later merges. Change-Id: I9f02d281d276b0f5b5f93b02a699144400db7520
This commit is contained in:
@@ -49,7 +49,8 @@ static const std::string QUERY_KEY_MAX_HDCP_LEVEL = "MaxHdcpLevel";
|
||||
// maximum supported HDCP level
|
||||
static const std::string QUERY_KEY_USAGE_SUPPORT = "UsageSupport";
|
||||
// whether usage reporting is supported
|
||||
static const std::string QUERY_KEY_MAX_NUMBER_OF_SESSIONS = "MaxNumberOfSessions";
|
||||
static const std::string QUERY_KEY_MAX_NUMBER_OF_SESSIONS =
|
||||
"MaxNumberOfSessions";
|
||||
|
||||
static const std::string QUERY_VALUE_TRUE = "True";
|
||||
static const std::string QUERY_VALUE_FALSE = "False";
|
||||
|
||||
@@ -893,11 +893,11 @@ void CdmEngine::OnTimerEvent() {
|
||||
|
||||
AutoLock lock(session_list_lock_);
|
||||
for (CdmSessionMap::iterator iter = sessions_.begin();
|
||||
iter != sessions_.end(); ++iter) {
|
||||
is_initial_usage_update = is_initial_usage_update ||
|
||||
iter->second->is_initial_usage_update();
|
||||
is_usage_update_needed = is_usage_update_needed ||
|
||||
iter->second->is_usage_update_needed();
|
||||
iter != sessions_.end(); ++iter) {
|
||||
is_initial_usage_update =
|
||||
is_initial_usage_update || iter->second->is_initial_usage_update();
|
||||
is_usage_update_needed =
|
||||
is_usage_update_needed || iter->second->is_usage_update_needed();
|
||||
|
||||
iter->second->OnTimerEvent(usage_update_period_expired);
|
||||
}
|
||||
@@ -906,7 +906,7 @@ void CdmEngine::OnTimerEvent() {
|
||||
(usage_update_period_expired || is_initial_usage_update)) {
|
||||
bool has_usage_been_updated = false;
|
||||
for (CdmSessionMap::iterator iter = sessions_.begin();
|
||||
iter != sessions_.end(); ++iter) {
|
||||
iter != sessions_.end(); ++iter) {
|
||||
iter->second->reset_usage_flags();
|
||||
if (!has_usage_been_updated) {
|
||||
// usage is updated for all sessions so this needs to be
|
||||
|
||||
@@ -140,7 +140,7 @@ typedef OEMCryptoResult (*L1_DeleteUsageEntry_t)(
|
||||
const uint8_t* message, size_t message_length, const uint8_t* signature,
|
||||
size_t signature_length);
|
||||
typedef OEMCryptoResult (*L1_DeleteUsageTable_t)();
|
||||
typedef OEMCryptoResult (*L1_GetMaxNumberOfSessions_t)(size_t *maximum);
|
||||
typedef OEMCryptoResult (*L1_GetMaxNumberOfSessions_t)(size_t* maximum);
|
||||
|
||||
struct FunctionPointers {
|
||||
uint32_t version;
|
||||
@@ -843,7 +843,7 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageTable() {
|
||||
return sts;
|
||||
}
|
||||
|
||||
extern "C" OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t *maximum) {
|
||||
extern "C" OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t* maximum) {
|
||||
if (!kAdapter) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
const FunctionPointers* fcn = kAdapter->get(kLevelDefault);
|
||||
if (!fcn) return OEMCrypto_ERROR_UNKNOWN_FAILURE;
|
||||
|
||||
@@ -48,5 +48,4 @@ TEST(TimerTest, TimerCheck) {
|
||||
EXPECT_LE(duration - 1, handler.timer_events());
|
||||
EXPECT_LE(handler.timer_events(), duration + 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user