Merge "Move the CDM version string to a header file" into rvc-dev

This commit is contained in:
Rahul Frias
2020-03-20 01:59:36 +00:00
committed by Android (Google) Code Review
3 changed files with 15 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
#ifndef WVCDM_WV_ANDROID_CONSTANTS_H_
#define WVCDM_WV_ANDROID_CONSTANTS_H_
#include <string>
namespace wvcdm {
static const std::string kWVAndroidCdmVersion = "16.0.0";
} // namespace wvcdm
#endif // WVCDM_WV_ANDROID_CONSTANTS_H_

View File

@@ -12,6 +12,7 @@
#include <android-base/properties.h>
#include "log.h"
#include "wv_android_constants.h"
namespace {
@@ -21,8 +22,6 @@ const char kL2Dir[] = "/L2/";
const char kL3Dir[] = "/L3/";
const char kFactoryKeyboxPath[] = "/factory/wv.keys";
const char kWVCdmVersion[] = "16.0.0";
bool GetAndroidProperty(const char* key, std::string* value) {
if (!key) {
LOGW("GetAndroidProperty: Invalid property key parameter");
@@ -109,7 +108,7 @@ bool Properties::GetWVCdmVersion(std::string* version) {
LOGW("Properties::GetWVCdmVersion: Invalid parameter");
return false;
}
*version = kWVCdmVersion;
*version = kWVAndroidCdmVersion;
return true;
}

View File

@@ -5646,13 +5646,7 @@ TEST(VersionNumberTest, VersionNumberChangeCanary) {
EXPECT_STREQ("R", release_number.c_str())
<< "The Android version number has changed. You need to update this test "
"and also possibly update the Widevine version number in "
"properties_android.cpp.";
std::string widevine_version;
ASSERT_TRUE(Properties::GetWVCdmVersion(&widevine_version));
EXPECT_EQ("16.0.0", widevine_version)
<< "The Widevine CDM version number has changed. Did you forget to "
"update this test after changing it?";
"wv_android_constants.h";
}
TEST_F(WvCdmRequestLicenseTest, AddHlsStreamingKeyTest) {