From 0a766b6d532413793b137cea2743710c82fa7de3 Mon Sep 17 00:00:00 2001 From: taoxueao Date: Sat, 14 Dec 2024 08:50:10 +0000 Subject: [PATCH 1/3] update base/ohos/sys_info_utils.cc. Signed-off-by: taoxueao --- base/ohos/sys_info_utils.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/base/ohos/sys_info_utils.cc b/base/ohos/sys_info_utils.cc index 8ba2a4e631..a07c955ab9 100644 --- a/base/ohos/sys_info_utils.cc +++ b/base/ohos/sys_info_utils.cc @@ -59,6 +59,8 @@ class SystemProperties { std::string product_model() { return product_model_; } + std::string api_version() { return api_version_; } + #ifdef OHOS_SCROLLBAR float get_pixel_ratio() { return virtual_pixel_ratio_;} void set_pixel_ratio(float ratio) { virtual_pixel_ratio_ = ratio;} @@ -76,6 +78,7 @@ class SystemProperties { std::string os_version_; std::string base_os_name_; std::string product_model_; + std::string api_version_; #ifdef OHOS_SCROLLBAR float virtual_pixel_ratio_ = 2.0; #endif @@ -102,7 +105,10 @@ SystemProperties::SystemProperties() .GetUserAgentBaseOSName()), product_model_(OhosAdapterHelper::GetInstance() .GetSystemPropertiesInstance() - .GetDeviceInfoProductModel()) {} + .GetDeviceInfoProductModel()), + api_version_(OhosAdapterHelper::GetInstance() + .GetSystemPropertiesInstance() + .GetDeviceInfoApiVersion()) {} } // namespace #ifdef OHOS_SCROLLBAR @@ -152,6 +158,10 @@ BASE_EXPORT std::string BaseOsName() { return SystemProperties::Instance()->base_os_name(); } +BASE_EXPORT std::string ApiVersion() { + return SystemProperties::Instance()->api_version(); +} + } // namespace ohos } // namespace base \ No newline at end of file -- Gitee From a14cee392ca4d3318ac12570b55d9119dc12e4d1 Mon Sep 17 00:00:00 2001 From: taoxueao Date: Sat, 14 Dec 2024 08:50:55 +0000 Subject: [PATCH 2/3] update base/ohos/sys_info_utils.h. Signed-off-by: taoxueao --- base/ohos/sys_info_utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/base/ohos/sys_info_utils.h b/base/ohos/sys_info_utils.h index f72ef3131f..ffce67d03e 100644 --- a/base/ohos/sys_info_utils.h +++ b/base/ohos/sys_info_utils.h @@ -48,6 +48,7 @@ BASE_EXPORT std::string OsVersion(); BASE_EXPORT std::string BaseOsName(); +BASE_EXPORT std::string ApiVersion(); } // namespace ohos } // namespace base -- Gitee From a2a5a63f48505cce7391a1057f863999faef6b67 Mon Sep 17 00:00:00 2001 From: taoxueao Date: Sat, 14 Dec 2024 08:52:01 +0000 Subject: [PATCH 3/3] update ui/events/blink/fling_booster_unittest.cc. Signed-off-by: taoxueao --- ui/events/blink/fling_booster_unittest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/events/blink/fling_booster_unittest.cc b/ui/events/blink/fling_booster_unittest.cc index e3f8bb1aa4..19f1e91e27 100644 --- a/ui/events/blink/fling_booster_unittest.cc +++ b/ui/events/blink/fling_booster_unittest.cc @@ -63,6 +63,7 @@ class MockSystemPropertiesAdapter : public OHOS::NWeb::SystemPropertiesAdapter { MOCK_METHOD(int32_t, GetLTPOStrategy, (), (override)); MOCK_METHOD(std::string, GetUserAgentBaseOSName, (), (override)); MOCK_METHOD(std::string, GetUserAgentOSVersion, (), (override)); + MOCK_METHOD(std::string, GetDeviceInfoApiVersion, (), (override)); }; } // namespace OHOS::NWeb #endif // OHOS_UNITTESTS -- Gitee