diff --git a/libwvdrmengine/cdm/include/wv_android_constants.h b/libwvdrmengine/cdm/include/wv_android_constants.h new file mode 100644 index 00000000..2a56977b --- /dev/null +++ b/libwvdrmengine/cdm/include/wv_android_constants.h @@ -0,0 +1,12 @@ +#ifndef WVCDM_WV_ANDROID_CONSTANTS_H_ +#define WVCDM_WV_ANDROID_CONSTANTS_H_ + +#include + +namespace wvcdm { + +static const std::string kWVAndroidCdmVersion = "16.0.0"; + +} // namespace wvcdm + +#endif // WVCDM_WV_ANDROID_CONSTANTS_H_ diff --git a/libwvdrmengine/cdm/src/properties_android.cpp b/libwvdrmengine/cdm/src/properties_android.cpp index 9ec43be4..82a7c7b9 100644 --- a/libwvdrmengine/cdm/src/properties_android.cpp +++ b/libwvdrmengine/cdm/src/properties_android.cpp @@ -12,6 +12,7 @@ #include #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; } diff --git a/libwvdrmengine/cdm/test/request_license_test.cpp b/libwvdrmengine/cdm/test/request_license_test.cpp index 8d78c804..66c38afa 100644 --- a/libwvdrmengine/cdm/test/request_license_test.cpp +++ b/libwvdrmengine/cdm/test/request_license_test.cpp @@ -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) {