!7473 三个部件依赖闭源转开源

Merge pull request !7473 from walker/master_1
This commit is contained in:
openharmony_ci 2024-07-17 11:13:52 +00:00 committed by Gitee
commit 918ee426da
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 27 additions and 70 deletions

View File

@ -64,11 +64,9 @@
"soc_perf",
"resource_management",
"resource_schedule_service",
"efficiency_manager",
"frame_aware_sched_override",
"imf",
"frame_aware_sched",
"memmgr_override",
"memmgr",
"data_share",
"accessibility",
"security_component_manager",

View File

@ -134,7 +134,7 @@ ohos_shared_library("scene_session_manager") {
defines = []
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_memmgr_override)) {
external_deps += [ "memmgr_override:memmgrclient" ]
external_deps += [ "memmgr:memmgrclient" ]
defines += [ "MEMMGR_WINDOW_ENABLE" ]
}
@ -156,11 +156,6 @@ ohos_shared_library("scene_session_manager") {
defines += [ "RES_SCHED_ENABLE" ]
}
if (efficiency_manager_enable) {
external_deps += [ "efficiency_manager:suspend_manager_client" ]
defines += [ "EFFICIENCY_MANAGER_ENABLE" ]
}
if (defined(global_parts_info) &&
defined(global_parts_info.security_security_component_manager)) {
external_deps += [ "security_component_manager:libsecurity_component_sdk" ]

View File

@ -420,6 +420,8 @@ private:
WSError ShiftFocus(sptr<SceneSession>& nextSession, FocusChangeReason reason = FocusChangeReason::DEFAULT);
void UpdateFocusStatus(sptr<SceneSession>& sceneSession, bool isFocused);
void NotifyFocusStatus(sptr<SceneSession>& sceneSession, bool isFocused);
int32_t NotifyRssThawApp(const int32_t uid, const std::string &bundleName,
const std::string &reason);
void NotifyFocusStatusByMission(sptr<SceneSession>& prevSession, sptr<SceneSession>& currSession);
bool MissionChanged(sptr<SceneSession>& prevSession, sptr<SceneSession>& currSession);
std::string GetAllSessionFocusInfo();

View File

@ -102,7 +102,8 @@
#include "focus_change_info.h"
#include "anr_manager.h"
#include "dms_reporter.h"
#include "res_sched_client.h"
#include "res_type.h"
#include "window_visibility_info.h"
#include "window_drawing_content_info.h"
#include "anomaly_detection.h"
@ -111,10 +112,6 @@
#include "mem_mgr_window_info.h"
#endif
#ifdef EFFICIENCY_MANAGER_ENABLE
#include "suspend_manager_client.h"
#endif // EFFICIENCY_MANAGER_ENABLE
#ifdef SECURITY_COMPONENT_MANAGER_ENABLE
#include "sec_comp_enhance_kit.h"
#endif
@ -4562,10 +4559,7 @@ void SceneSessionManager::NotifyFocusStatus(sptr<SceneSession>& sceneSession, bo
sceneSession->GetWindowType(),
sceneSession->GetAbilityToken()
);
#ifdef EFFICIENCY_MANAGER_ENABLE
SuspendManager::SuspendManagerClient::GetInstance().ThawOneApplication(focusChangeInfo->uid_,
"", "THAW_BY_FOCUS_CHANGED");
#endif // EFFICIENCY_MANAGER_ENABLE
SceneSessionManager::NotifyRssThawApp(focusChangeInfo->uid_, "", "THAW_BY_FOCUS_CHANGED");
SessionManagerAgentController::GetInstance().UpdateFocusChangeInfo(focusChangeInfo, isFocused);
sceneSession->NotifyFocusStatus(isFocused);
std::string sName = "FoucusWindow:";
@ -4587,6 +4581,19 @@ void SceneSessionManager::NotifyFocusStatus(sptr<SceneSession>& sceneSession, bo
}
}
int32_t SceneSessionManager::NotifyRssThawApp(const int32_t uid, const std::string &bundleName,
const std::string &reason)
{
uint32_t resType = ResourceSchedule::ResType::SYNC_RES_TYPE_THAW_ONE_APP;
nlohmann::json payload;
payload.emplace("uid", uid);
payload.emplace("bundleName", bundleName);
payload.emplace("reason", reason);
nlohmann::json reply;
int32_t ret = ResourceSchedule::ResSchedClient::GetInstance().ReportSyncEvent(resType, 0, payload, reply);
return ret;
}
void SceneSessionManager::NotifyFocusStatusByMission(sptr<SceneSession>& prevSession, sptr<SceneSession>& currSession)
{
if (listenerController_ != nullptr) {

View File

@ -31,16 +31,10 @@ accessibility_path = "//foundation/barrierfree/accessibility"
ability_runtime_native_path = "${ability_runtime_path}/frameworks/native"
declare_args() {
efficiency_manager_enable = true
device_status_enable = true
window_manager_feature_subscribe_motion = false
window_manager_feature_tp_enable = false
if (defined(global_parts_info) &&
!defined(global_parts_info.resourceschedule_efficiency_manager)) {
efficiency_manager_enable = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.msdp_device_status)) {
device_status_enable = false

View File

@ -142,21 +142,8 @@ ohos_static_library("libwm_static") {
external_deps += [ "accessibility:accessibility_common" ]
}
if (efficiency_manager_enable) {
external_deps += [ "efficiency_manager:suspend_manager_client" ]
defines += [ "EFFICIENCY_MANAGER_ENABLE" ]
}
if (defined(global_parts_info)) {
if (defined(
global_parts_info.hmosresourceschedule_frame_aware_sched_override)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched_override:frame_trace_intf" ]
} else if (defined(global_parts_info.resourceschedule_frame_aware_sched)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
}
}
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
@ -294,16 +281,8 @@ ohos_shared_library("libwm") {
external_deps += [ "accessibility:accessibility_common" ]
}
if (defined(global_parts_info)) {
if (defined(
global_parts_info.hmosresourceschedule_frame_aware_sched_override)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched_override:frame_trace_intf" ]
} else if (defined(global_parts_info.resourceschedule_frame_aware_sched)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
}
}
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
@ -375,21 +354,8 @@ ohos_shared_library("libwm_lite") {
"samgr:samgr_proxy",
]
if (efficiency_manager_enable) {
external_deps += [ "efficiency_manager:suspend_manager_client" ]
defines += [ "EFFICIENCY_MANAGER_ENABLE" ]
}
if (defined(global_parts_info)) {
if (defined(
global_parts_info.hmosresourceschedule_frame_aware_sched_override)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched_override:frame_trace_intf" ]
} else if (defined(global_parts_info.resourceschedule_frame_aware_sched)) {
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
}
}
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {

View File

@ -81,11 +81,6 @@ ohos_unittest("wm_window_manager_test") {
"ffrt:libffrt",
"hilog:libhilog",
]
if (efficiency_manager_enable) {
external_deps += [ "efficiency_manager:suspend_manager_client" ]
defines = [ "EFFICIENCY_MANAGER_ENABLE" ]
}
}
ohos_unittest("wm_window_display_change_adapter_test") {

View File

@ -229,7 +229,7 @@ if (scene_board_enabled) {
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_memmgr_override)) {
external_deps += [ "memmgr_override:memmgrclient" ]
external_deps += [ "memmgr:memmgrclient" ]
defines += [ "MEMMGR_WINDOW_ENABLE" ]
}