!48387 arkui-x update master OH to weekly_20241111 and OH fix build bug

Merge pull request !48387 from mufeng521/mufeng_master_oh_weekly_20241111
This commit is contained in:
oh_ci 2024-11-13 02:50:43 +00:00 committed by Gitee
commit 64e9fc819b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
20 changed files with 223 additions and 30 deletions

View File

@ -76,6 +76,7 @@ template("ace_osal_ohos_source_set") {
"stylus_detector_mgr.cpp",
"system_properties.cpp",
"thp_extra_manager_impl.cpp",
"thread_priority.cpp",
"trace_id_impl.cpp",
"view_data_wrap_ohos.cpp",
"want_wrap_ohos.cpp",

View File

@ -929,4 +929,9 @@ double SystemProperties::GetSrollableFriction()
auto ret = system::GetParameter("persist.scrollable.friction", "");
return StringUtils::StringToDouble(ret);
}
bool SystemProperties::IsCrossPlatform()
{
return false;
}
} // namespace OHOS::Ace

View File

@ -0,0 +1,22 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread/thread_priority.h"
namespace OHOS::Ace {
void ThreadPriority::SetThreadPriority(TaskExecutor::TaskType taskType) {}
void ThreadPriority::setBackGroundThreadPriority() {}
} // namespace OHOS::Ace

View File

@ -89,6 +89,7 @@ ohos_source_set("preview_osal_source") {
"system_bar_style_ohos.cpp",
"system_properties.cpp",
"task/task_runner_adapter_impl.cpp",
"thread_priority.cpp",
"time_event_proxy_preview.cpp",
"trace_id_impl.cpp",
"view_data_wrap_impl.cpp",

View File

@ -346,4 +346,9 @@ double SystemProperties::GetSrollableFriction()
{
return 0.0;
}
bool SystemProperties::IsCrossPlatform()
{
return false;
}
} // namespace OHOS::Ace

View File

@ -0,0 +1,22 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread/thread_priority.h"
namespace OHOS::Ace {
void ThreadPriority::SetThreadPriority(TaskExecutor::TaskType taskType) {}
void ThreadPriority::setBackGroundThreadPriority() {}
} // namespace OHOS::Ace

View File

@ -20,6 +20,8 @@
#include "base/log/log.h"
#include "base/memory/memory_monitor.h"
#include "base/thread/frame_trace_adapter.h"
#include "base/thread/task_executor.h"
#include "base/thread/thread_priority.h"
namespace OHOS::Ace {
namespace {
@ -190,6 +192,7 @@ void BackgroundTaskExecutor::ThreadLoop(uint32_t threadNo)
return;
}
SetThreadName(threadNo);
ThreadPriority::SetThreadPriority(TaskExecutor::TaskType::BACKGROUND);
Task task;
const uint32_t purgeFlag = (1u << (threadNo - 1u));
std::unique_lock<std::mutex> lock(mutex_);

View File

@ -0,0 +1,32 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FOUNDATION_ACE_FRAMEWORKS_BASE_THREAD_THREAD_PRIORITY_H
#define FOUNDATION_ACE_FRAMEWORKS_BASE_THREAD_THREAD_PRIORITY_H
#include "base/thread/task_executor.h"
namespace OHOS::Ace {
class ThreadPriority {
public:
~ThreadPriority() = default;
static void SetThreadPriority(TaskExecutor::TaskType taskType);
static void setBackGroundThreadPriority();
private:
ThreadPriority() = default;
};
} // namespace OHOS::Ace
#endif // FOUNDATION_ACE_FRAMEWORKS_BASE_THREAD_THREAD_PRIORITY_H

View File

@ -606,6 +606,8 @@ public:
static double GetSrollableFriction();
static bool IsCrossPlatform();
private:
static bool opincEnabled_;
static bool developerModeOn_;

View File

@ -289,12 +289,15 @@ void PanRecognizer::HandleTouchUpEvent(const TouchEvent& event)
return;
}
if (currentFingers_ == fingers_) {
if (currentFingers_ == fingers_ && !SystemProperties::IsCrossPlatform()) {
UpdateTouchPointInVelocityTracker(event);
} else if (currentFingers_ > fingers_) {
}
if (currentFingers_ > fingers_) {
panVelocity_.Reset(event.id);
UpdateTouchPointInVelocityTracker(event);
}
UpdateTouchEventInfo(event);
if ((currentFingers_ <= fingers_) &&

View File

@ -17,6 +17,7 @@ ace_unittest("geometry_test") {
module_output = "basic"
type = "new"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"animatable_dimension_test.cpp",
"animatable_matrix4_test.cpp",
"dimension_test.cpp",
@ -33,6 +34,7 @@ ace_unittest("util_test") {
module_output = "basic"
type = "new"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"base_utils_test.cpp",
"json_util_test.cpp",
"node_object_test.cpp",

View File

@ -18,6 +18,7 @@ ace_unittest("accessibility_linux_test_ng") {
type = "new"
module_output = "basic"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"$ace_root/frameworks/core/accessibility/accessibility_manager_ng.cpp",
"$ace_root/frameworks/core/accessibility/accessibility_session_adapter.cpp",
"accessibility_manager_ng_test_ng.cpp",
@ -142,6 +143,7 @@ ace_unittest("js_inspector_test") {
type = "new"
module_output = "basic"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"$ace_root/frameworks/core/accessibility/js_inspector/inspect_badge.cpp",
"$ace_root/frameworks/core/accessibility/js_inspector/inspect_button.cpp",
"$ace_root/frameworks/core/accessibility/js_inspector/inspect_camera.cpp",

View File

@ -15,7 +15,10 @@ import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
ace_unittest("geometry_transition_test_ng") {
type = "new"
sources = [ "geometry_transition_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"geometry_transition_test_ng.cpp",
]
}
group("core_animation_unittest") {

View File

@ -18,19 +18,26 @@ import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
ace_unittest("view_stack_processor_test_ng") {
type = "new"
module_output = "basic"
sources = [ "view_stack_processor_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"view_stack_processor_test_ng.cpp",
]
}
ace_unittest("distributed_ui_test_ng") {
type = "new"
module_output = "basic"
sources = [ "distributed_ui_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"distributed_ui_test_ng.cpp",
]
}
ace_unittest("frame_node_test_ng") {
type = "new"
module_output = "basic"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"frame_node_test_ng.cpp",
"frame_node_test_ng_coverage.cpp",
"frame_node_test_ng_coverage_new.cpp",
@ -42,31 +49,44 @@ ace_unittest("frame_node_test_ng") {
ace_unittest("frame_node_drop_test_ng") {
type = "new"
module_output = "basic"
sources = [ "frame_node_drop_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"frame_node_drop_test_ng.cpp",
]
}
ace_unittest("geometry_node_test_ng") {
type = "new"
module_output = "basic"
sources = [ "geometry_node_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"geometry_node_test_ng.cpp",
]
}
ace_unittest("inspector_test_ng") {
type = "new"
module_output = "basic"
sources = [ "inspector_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"inspector_test_ng.cpp",
]
}
ace_unittest("ui_node_test_ng") {
type = "new"
module_output = "basic"
sources = [ "ui_node_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"ui_node_test_ng.cpp",
]
}
ace_unittest("view_abstract_test_ng") {
type = "new"
module_output = "basic"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"view_abstract_test_ng.cpp",
"view_abstract_test_ng_for_property_config.cpp",
"view_abstract_test_ng_new.cpp",
@ -76,37 +96,55 @@ ace_unittest("view_abstract_test_ng") {
ace_unittest("view_full_update_model_ng_test") {
type = "new"
module_output = "basic"
sources = [ "view_full_update_model_ng_test.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"view_full_update_model_ng_test.cpp",
]
}
ace_unittest("view_partial_update_model_test_ng") {
type = "new"
module_output = "basic"
sources = [ "view_partial_update_model_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"view_partial_update_model_test_ng.cpp",
]
}
ace_unittest("observer_test_ng") {
type = "new"
module_output = "basic"
sources = [ "observer_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"observer_test_ng.cpp",
]
}
ace_unittest("view_abstract_model_test_ng") {
type = "new"
module_output = "basic"
sources = [ "view_abstract_model_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"view_abstract_model_test_ng.cpp",
]
}
ace_unittest("short_cuts_little_test_ng") {
type = "new"
module_output = "basic"
sources = [ "short_cuts_little_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"short_cuts_little_test_ng.cpp",
]
}
ace_unittest("short_cuts_test_ng") {
type = "new"
module_output = "basic"
sources = [ "short_cuts_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"short_cuts_test_ng.cpp",
]
}
group("core_base_unittest") {

View File

@ -18,6 +18,7 @@ ace_unittest("common_test") {
module_output = "common"
sources = [
"$ace_root/adapter/ohos/entrance/file_asset_provider_impl.cpp",
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"$ace_root/frameworks/core/common/asset_manager_impl.cpp",
"$ace_root/frameworks/core/common/environment/environment_proxy.cpp",
"$ace_root/frameworks/core/common/resource/resource_manager.cpp",

View File

@ -33,13 +33,17 @@ ace_unittest("event_manager_test_ng") {
ace_unittest("click_event_test_ng") {
module_output = "events"
type = "new"
sources = [ "click_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"click_event_test_ng.cpp",
]
}
ace_unittest("drag_event_test_ng") {
type = "new"
module_output = "events"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"drag_event_test_ng.cpp",
"drag_event_test_ng_property_config.cpp",
"drag_event_test_ng_property_config_coverage.cpp",
@ -49,13 +53,17 @@ ace_unittest("drag_event_test_ng") {
ace_unittest("event_hub_test_ng") {
type = "new"
module_output = "events"
sources = [ "event_hub_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"event_hub_test_ng.cpp",
]
}
ace_unittest("focus_hub_test_ng") {
type = "new"
module_output = "events"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"focus_hub_test_ng.cpp",
"focus_hub_test_ng_branch_coverage.cpp",
"focus_hub_test_ng_for_property_config.cpp",
@ -67,6 +75,7 @@ ace_unittest("gesture_event_hub_test_ng") {
type = "new"
module_output = "events"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"gesture_event_hub_test_ng.cpp",
"gesture_event_hub_test_ng_coverage.cpp",
"gesture_event_hub_test_ng_property_config.cpp",
@ -78,6 +87,7 @@ ace_unittest("input_event_hub_test_ng") {
type = "new"
module_output = "events"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"$ace_root/frameworks/core/event/mouse_event.cpp",
"input_event_hub_test_ng.cpp",
]
@ -86,49 +96,73 @@ ace_unittest("input_event_hub_test_ng") {
ace_unittest("long_press_event_test_ng") {
module_output = "events"
type = "new"
sources = [ "long_press_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"long_press_event_test_ng.cpp",
]
}
ace_unittest("pan_event_test_ng") {
type = "new"
module_output = "events"
sources = [ "pan_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"pan_event_test_ng.cpp",
]
}
ace_unittest("scrollable_event_test_ng") {
type = "new"
module_output = "events"
sources = [ "scrollable_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"scrollable_event_test_ng.cpp",
]
}
ace_unittest("state_style_test_ng") {
type = "new"
module_output = "events"
sources = [ "state_style_manager_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"state_style_manager_test_ng.cpp",
]
}
ace_unittest("touch_event_test_ng") {
type = "new"
module_output = "events"
sources = [ "touch_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"touch_event_test_ng.cpp",
]
}
ace_unittest("response_ctrl_test_ng") {
type = "new"
module_output = "events"
sources = [ "response_ctrl_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"response_ctrl_test_ng.cpp",
]
}
ace_unittest("input_event_test_ng") {
type = "new"
module_output = "events"
sources = [ "input_event_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"input_event_test_ng.cpp",
]
}
ace_unittest("focus_box_test_ng") {
type = "new"
module_output = "events"
sources = [ "focus_box_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"focus_box_test_ng.cpp",
]
}
group("core_event_unittest") {

View File

@ -17,6 +17,7 @@ ace_unittest("gestures_test_ng") {
type = "new"
module_output = "gestures"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"click_recognizer_test_ng.cpp",
"exclusive_recognizer_test_ng.cpp",
"gesture_group_test_ng.cpp",

View File

@ -16,13 +16,17 @@ import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
ace_unittest("box_layout_algorithm_test_ng") {
type = "new"
module_output = "layout"
sources = [ "box_layout_algorithm_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"box_layout_algorithm_test_ng.cpp",
]
}
ace_unittest("layout_property_test_ng") {
type = "new"
module_output = "layout"
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"layout_property_test_ng.cpp",
"layout_property_test_ng_two.cpp",
]
@ -40,13 +44,19 @@ ace_unittest("layout_wrapper_test_ng") {
ace_unittest("layout_wrapper_build_test_ng") {
type = "new"
module_output = "layout"
sources = [ "layout_wrapper_build_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"layout_wrapper_build_test_ng.cpp",
]
}
ace_unittest("layout_wrapper_node_test_ng") {
type = "new"
module_output = "layout"
sources = [ "layout_wrapper_node_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"layout_wrapper_node_test_ng.cpp",
]
}
group("core_layout_unittest") {

View File

@ -16,5 +16,8 @@ import("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
ace_unittest("safeArea_test_expandSafeArea_ng") {
type = "new"
module_output = "layout"
sources = [ "expand_safe_area_test_ng.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"expand_safe_area_test_ng.cpp",
]
}

View File

@ -83,7 +83,10 @@ ace_unittest("shared_overlay_manager_test_ng") {
ace_unittest("display_sync_manager_test_ng") {
type = "new"
module_output = "manager"
sources = [ "display_sync_manager_test.cpp" ]
sources = [
"$ace_root/adapter/ohos/osal/thread_priority.cpp",
"display_sync_manager_test.cpp",
]
}
ace_unittest("frame_rate_manager_test_ng") {