Update property retrival method
[ Merge of http://go/wvgerrit/70203 ] The earlier property_get() method had a limitation on property length. Properties of some new devices exceed that length. An error message is returned rather than a truncated string. Replace its use with android::base::GetProperty() which does not have a length limitation. Bug: 115358798 Test: WV unit/integration tests Change-Id: I46ce9a7e77bcd031225d0082f83c57d484fe5405
This commit is contained in:
@@ -43,7 +43,7 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libwvlevel3 \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libbase \
|
||||
libdl \
|
||||
liblog \
|
||||
libmedia_omx \
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <errno.h>
|
||||
#include <sstream>
|
||||
|
||||
#include <cutils/properties.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -4771,10 +4771,10 @@ INSTANTIATE_TEST_CASE_P(Cdm, WvCdmSessionSharingNoKeyTest,
|
||||
&single_encrypted_sub_sample));
|
||||
|
||||
TEST(VersionNumberTest, VersionNumberChangeCanary) {
|
||||
char release_number[PROPERTY_VALUE_MAX];
|
||||
ASSERT_GT(property_get("ro.build.version.release", release_number, "Unknown"),
|
||||
0);
|
||||
EXPECT_STREQ("Q", release_number)
|
||||
std::string release_number =
|
||||
android::base::GetProperty("ro.build.version.release", "");
|
||||
ASSERT_TRUE(release_number.size() > 0);
|
||||
EXPECT_STREQ("Q", 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.";
|
||||
|
||||
@@ -43,7 +43,7 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libwvlevel3 \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libbase \
|
||||
libdl \
|
||||
liblog \
|
||||
libmedia_omx \
|
||||
|
||||
Reference in New Issue
Block a user