Turn off verbose logging

This CL turns off the verbose logging if LOG_NDEBUG is 1, or if NDEBUG
is defined.  You can set the environment variable LOG_NDEBUG to 0 to
turn on verbose debugging for the CDM library on android.

Also, as in b/9672657, some applications call SelectKey when switching
between video and audio, which is much too verbose and affects
playback.  I have removed the log statements for SelectKey.

bug: 9672657

Change-Id: I635b997118996871356f7126852b4744fb05e810
This commit is contained in:
Fred Gylys-Colwell
2013-08-28 14:34:08 -07:00
parent b4dae0af49
commit 144f5ced83
2 changed files with 18 additions and 2 deletions

View File

@@ -433,12 +433,10 @@ bool CryptoSession::RefreshKeys(const std::string& message,
}
bool CryptoSession::SelectKey(const std::string& key_id) {
LOGV("CryptoSession::SelectKey: Lock");
AutoLock auto_lock(crypto_lock_);
const uint8_t* key_id_string =
reinterpret_cast<const uint8_t*>(key_id.data());
LOGV("SelectKey: id=%ld", static_cast<uint32_t>(oec_session_id_));
OEMCryptoResult sts =
OEMCrypto_SelectKey(oec_session_id_, key_id_string, key_id.size());
if (OEMCrypto_SUCCESS != sts) {