Merge "Correct WV log spam"
This commit is contained in:
@@ -139,6 +139,10 @@ bool DeviceFiles::RetrieveCertificate(bool atsc_mode_enabled,
|
|||||||
uint32_t* system_id) {
|
uint32_t* system_id) {
|
||||||
RETURN_FALSE_IF_UNINITIALIZED();
|
RETURN_FALSE_IF_UNINITIALIZED();
|
||||||
|
|
||||||
|
if (!HasCertificate(atsc_mode_enabled)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
video_widevine_client::sdk::File file;
|
video_widevine_client::sdk::File file;
|
||||||
if (RetrieveHashedFile(GetCertificateFileName(atsc_mode_enabled), &file) !=
|
if (RetrieveHashedFile(GetCertificateFileName(atsc_mode_enabled), &file) !=
|
||||||
kNoError) {
|
kNoError) {
|
||||||
@@ -1109,7 +1113,7 @@ DeviceFiles::ResponseType DeviceFiles::RetrieveHashedFile(
|
|||||||
path += name;
|
path += name;
|
||||||
|
|
||||||
if (!file_system_->Exists(path)) {
|
if (!file_system_->Exists(path)) {
|
||||||
LOGE("File does not exist: path = %s", path.c_str());
|
LOGW("File does not exist: path = %s", path.c_str());
|
||||||
return kFileNotFound;
|
return kFileNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2160,7 +2160,8 @@ TEST_P(DeviceCertificateTest, ReadCertificate) {
|
|||||||
// Call to Open will return a unique_ptr, freeing this object.
|
// Call to Open will return a unique_ptr, freeing this object.
|
||||||
MockFile* file = new MockFile();
|
MockFile* file = new MockFile();
|
||||||
EXPECT_CALL(file_system, Exists(StrEq(device_certificate_path)))
|
EXPECT_CALL(file_system, Exists(StrEq(device_certificate_path)))
|
||||||
.WillOnce(Return(true));
|
.Times(2)
|
||||||
|
.WillRepeatedly(Return(true));
|
||||||
EXPECT_CALL(file_system, FileSize(StrEq(device_certificate_path)))
|
EXPECT_CALL(file_system, FileSize(StrEq(device_certificate_path)))
|
||||||
.WillOnce(Return(data.size()));
|
.WillOnce(Return(data.size()));
|
||||||
EXPECT_CALL(file_system, DoOpen(StrEq(device_certificate_path), _))
|
EXPECT_CALL(file_system, DoOpen(StrEq(device_certificate_path), _))
|
||||||
|
|||||||
Reference in New Issue
Block a user