Rearrange deps and compiling modules

Signed-off-by: wangzhen <wangzhen346@huawei.com>
Change-Id: I9b6b2d0cf1fa83c752d257c5a82b1089a3405bbd
This commit is contained in:
wangzhen
2024-05-23 09:33:09 +08:00
parent 1f6da60a72
commit d3cc5d599c
63 changed files with 335 additions and 198 deletions
+8
View File
@@ -458,6 +458,14 @@
]
},
"name": "//foundation/ability/ability_runtime/frameworks/native/ability/native:dialog_request_callback"
},
{
"header": {
"header_base": "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager/include",
"header_files": [
]
},
"name": "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager:ability_manager_base"
}
],
"test": [
@@ -21,8 +21,8 @@
#include <uv.h>
#include "ability_util.h"
#include "ability_manager_client.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "js_napi_common_ability.h"
#include "js_runtime_utils.h"
#include "napi_common_util.h"
@@ -206,7 +206,6 @@ ohos_shared_library("abilitykit_native") {
"${ability_runtime_native_path}/ability/native/data_ability_helper_impl.cpp",
"${ability_runtime_native_path}/ability/native/data_ability_impl.cpp",
"${ability_runtime_native_path}/ability/native/data_uri_utils.cpp",
"${ability_runtime_native_path}/ability/native/distributed_ability_runtime/distributed_client.cpp",
"${ability_runtime_native_path}/ability/native/free_install_observer_proxy.cpp",
"${ability_runtime_native_path}/ability/native/free_install_observer_stub.cpp",
"${ability_runtime_native_path}/ability/native/insight_intent_host_client.cpp",
+2 -2
View File
@@ -30,6 +30,7 @@
#include "ability_thread.h"
#include "ability_util.h"
#include "app_loader.h"
#include "ability_manager_client.h"
#include "app_recovery.h"
#include "app_utils.h"
#include "appfreeze_inner.h"
@@ -56,7 +57,6 @@
#include "file_path_utils.h"
#include "freeze_util.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "resource_config_helper.h"
#ifdef SUPPORT_SCREEN
#include "locale_config.h"
@@ -1573,7 +1573,7 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, con
TAG_LOGI(AAFwkTag::APPKIT, "hisysevent write result=%{public}d, send event [FRAMEWORK,PROCESS_KILL],"
" pid=%{public}d, processName=%{public}s, msg=%{public}s", result, pid, processName.c_str(),
KILL_REASON);
if (ApplicationDataManager::GetInstance().NotifyUnhandledException(summary) &&
ApplicationDataManager::GetInstance().NotifyExceptionObject(appExecErrorObj)) {
return;
+106 -6
View File
@@ -29,7 +29,6 @@ config("ability_manager_public_config") {
"${ability_runtime_path}/interfaces/kits/native/ability/native",
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/kits",
"${ability_runtime_path}/interfaces/kits/native/ability/native/continuation/distributed",
"${bundlefwk_inner_api_path}/appexecfwk_base/include",
"${ability_runtime_innerkits_path}/ability_manager/include",
"${ability_runtime_innerkits_path}/app_manager/include/appmgr",
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
@@ -62,6 +61,112 @@ config("ability_manager_public_config") {
}
}
ohos_shared_library("ability_manager_base") {
sanitize = {
integer_overflow = true
ubsan = true
boundary_sanitize = true
cfi = true
cfi_cross_dso = true
cfi_vcall_icall_only = true
debug = false
}
branch_protector_ret = "pac_ret"
include_dirs = [
"${ability_runtime_innerkits_path}/ability_manager/include",
"${ability_runtime_innerkits_path}/ability_manager/include/status_bar_delegate",
"${ability_runtime_path}/interfaces/kits/native/ability/native",
"${ability_runtime_services_path}/abilitymgr/include",
"${ability_runtime_services_path}/common/include",
]
defines = []
if (ability_command_for_test) {
defines += [ "ABILITY_COMMAND_FOR_TEST" ]
}
if (ability_runtime_graphics) {
defines += [
"SUPPORT_GRAPHICS",
"SUPPORT_SCREEN",
]
}
cflags = []
if (target_cpu == "arm") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
sources = [
"${ability_runtime_native_path}/ability/native/data_ability_operation.cpp",
"${ability_runtime_native_path}/ability/native/data_ability_operation_builder.cpp",
"${ability_runtime_native_path}/ability/native/data_ability_result.cpp",
"${ability_runtime_services_path}/abilitymgr/src/ability_running_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/acquire_share_data_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/auto_startup_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/dialog_session_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/exit_reason.cpp",
"${ability_runtime_services_path}/abilitymgr/src/extension_running_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_param.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_result.cpp",
"${ability_runtime_services_path}/abilitymgr/src/launch_param.cpp",
"${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/mission_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/open_link/open_link_options.cpp",
"${ability_runtime_services_path}/abilitymgr/src/prepare_terminate_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/remote_on_listener_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/sender_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/ui_extension_ability_connect_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/ui_extension_host_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/user_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/want_sender_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp",
"src/status_bar_delegate/status_bar_delegate_proxy.cpp",
]
if (ability_runtime_graphics) {
sources += [
"src/ability_first_frame_state_data.cpp",
"src/ability_first_frame_state_observer_proxy.cpp",
]
}
deps = [
":ability_start_options",
":ability_start_setting",
]
external_deps = [
"ability_base:base",
"bundle_framework:appexecfwk_base",
"bundle_framework:libappexecfwk_common",
"c_utils:utils",
"hilog:libhilog",
"hitrace:hitrace_meter",
"ipc:ipc_core",
]
public_external_deps = [
"ability_base:configuration",
"ability_base:want",
"ability_base:zuri",
"bundle_framework:appexecfwk_core",
"relational_store:native_dataability",
"relational_store:native_rdb",
]
innerapi_tags = [
"platformsdk",
"sasdk",
]
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_shared_library("ability_manager") {
sources = [
"${ability_runtime_native_path}/ability/native/data_ability_operation.cpp",
@@ -74,14 +179,12 @@ ohos_shared_library("ability_manager") {
"${ability_runtime_services_path}/abilitymgr/src/ability_manager_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/ability_running_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/ability_scheduler_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/acquire_share_data_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/acquire_share_data_callback_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/auto_startup_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/caller_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/dialog_session_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/exit_reason.cpp",
"${ability_runtime_services_path}/abilitymgr/src/extension_running_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_callback_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_param.cpp",
"${ability_runtime_services_path}/abilitymgr/src/insight_intent_execute_result.cpp",
@@ -89,7 +192,6 @@ ohos_shared_library("ability_manager") {
"${ability_runtime_services_path}/abilitymgr/src/lifecycle_state_info.cpp",
"${ability_runtime_services_path}/abilitymgr/src/mission_listener_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/open_link/open_link_options.cpp",
"${ability_runtime_services_path}/abilitymgr/src/prepare_terminate_callback_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/prepare_terminate_callback_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/remote_mission_listener_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/remote_on_listener_proxy.cpp",
@@ -105,7 +207,6 @@ ohos_shared_library("ability_manager") {
"${ability_runtime_services_path}/abilitymgr/src/want_sender_proxy.cpp",
"${ability_runtime_services_path}/abilitymgr/src/want_sender_stub.cpp",
"${ability_runtime_services_path}/abilitymgr/src/wants_info.cpp",
"src/status_bar_delegate/status_bar_delegate_proxy.cpp",
"src/status_bar_delegate/status_bar_delegate_stub.cpp",
"src/window_manager_service_handler_proxy.cpp",
"src/window_manager_service_handler_stub.cpp",
@@ -114,7 +215,6 @@ ohos_shared_library("ability_manager") {
if (ability_runtime_graphics) {
sources += [
"src/ability_first_frame_state_data.cpp",
"src/ability_first_frame_state_observer_proxy.cpp",
"src/ability_first_frame_state_observer_stub.cpp",
]
}
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include "parcel.h"
#include "app_mgr_constants.h"
#include "iremote_object.h"
namespace OHOS {
+1 -11
View File
@@ -118,7 +118,7 @@ ohos_shared_library("abilityms") {
]
include_dirs = [ "${ability_runtime_services_path}/appdfr/include" ]
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_manager_base",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
@@ -128,7 +128,6 @@ ohos_shared_library("abilityms") {
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
"${ability_runtime_innerkits_path}/session_handler:session_handler",
"${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_native_path}/ability/native:auto_startup_callback",
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
"${ability_runtime_path}/utils/global/freeze:freeze_util",
@@ -142,7 +141,6 @@ ohos_shared_library("abilityms") {
external_deps = [
"ability_base:base",
"ability_base:configuration",
"ability_base:extractortool",
"ability_base:session_info",
"ability_base:view_data",
"ability_base:want",
@@ -153,7 +151,6 @@ ohos_shared_library("abilityms") {
"bundle_framework:appexecfwk_core",
"bundle_framework:libappexecfwk_common",
"c_utils:utils",
"common_event_service:cesfwk_core",
"common_event_service:cesfwk_innerkits",
"config_policy:configpolicy_util",
"dsoftbus:softbus_client",
@@ -175,11 +172,7 @@ ohos_shared_library("abilityms") {
"relational_store:native_rdb",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
"window_manager:libmodal_system_ui_extension_client",
"window_manager:libwsutils",
"window_manager:scene_session",
"window_manager:session_manager_lite",
"window_manager:sms",
]
public_external_deps = [ "background_task_mgr:bgtaskmgr_innerkits" ]
@@ -207,10 +200,7 @@ ohos_shared_library("abilityms") {
external_deps += [
"ability_base:session_info",
"i18n:intl_util",
"icu:shared_icuuc",
"image_framework:image_native",
"input:libmmi-client",
"resource_management:global_resmgr",
"screenlock_mgr:screenlock_client",
"window_manager:libdm",
"window_manager:libmodal_system_ui_extension_client",
+1 -11
View File
@@ -36,19 +36,12 @@ abilityms_files = [
"src/data_ability_record.cpp",
"src/dialog_session_record.cpp",
"src/lifecycle_deal.cpp",
"src/ability_running_info.cpp",
"src/ecological_rule/ability_ecological_rule_mgr_service_param.cpp",
"src/ecological_rule/ability_ecological_rule_mgr_service.cpp",
"src/extension_config.cpp",
"src/extension_running_info.cpp",
"src/caller_info.cpp",
"src/sender_info.cpp",
"src/sub_managers_helper.cpp",
"src/wants_info.cpp",
"src/want_sender_info.cpp",
"src/pending_want_record.cpp",
"src/want_receiver_proxy.cpp",
"src/want_sender_proxy.cpp",
"src/want_sender_stub.cpp",
"src/pending_want_key.cpp",
"src/pending_want_manager.cpp",
@@ -85,8 +78,6 @@ abilityms_files = [
"src/ui_extension_record.cpp",
"src/ui_extension_record_factory.cpp",
"src/screen_lock/unlock_screen_manager.cpp",
"src/start_options.cpp",
"src/user_callback_proxy.cpp",
"src/call_container.cpp",
"src/call_record.cpp",
"src/inner_mission_info.cpp",
@@ -121,6 +112,7 @@ abilityms_files = [
"src/atomic_service_status_callback.cpp",
"src/free_install_manager.cpp",
"src/free_install_observer_manager.cpp",
"src/distributed_client.cpp",
"src/background_task_observer.cpp",
"src/resident_process_manager.cpp",
@@ -132,9 +124,7 @@ abilityms_files = [
"src/ability_auto_startup_data_manager.cpp",
"src/ability_auto_startup_service.cpp",
"src/auto_startup_info.cpp",
"src/insight_intent_execute_manager.cpp",
"src/insight_intent_execute_result.cpp",
"src/ability_manager_event_subscriber.cpp",
]
@@ -0,0 +1,50 @@
/*
* 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.
*/
#ifndef OHOS_ABILITY_RUNTIME_ABILITY_SERVICE_UTIL_H
#define OHOS_ABILITY_RUNTIME_ABILITY_SERVICE_UTIL_H
#include "ability_manager_service.h"
#include "bundle_mgr_helper.h"
#include "hilog_tag_wrapper.h"
namespace OHOS {
namespace AAFwk {
namespace AbilityUtil {
constexpr const char* MARKET_BUNDLE_NAME = "com.huawei.hmsapp.appgallery";
constexpr const char* MARKET_CROWD_TEST_BUNDLE_PARAM = "crowd_test_bundle_name";
[[maybe_unused]] static int StartAppgallery(const std::string &bundleName, const int requestCode, const int32_t userId,
const std::string &action)
{
std::string appGalleryBundleName;
auto bundleMgrHelper = AbilityUtil::GetBundleManagerHelper();
if (bundleMgrHelper == nullptr || !bundleMgrHelper->QueryAppGalleryBundleName(appGalleryBundleName)) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "Get bundle manager helper failed or QueryAppGalleryBundleName failed.");
appGalleryBundleName = MARKET_BUNDLE_NAME;
}
TAG_LOGD(AAFwkTag::ABILITYMGR, "appGalleryBundleName:%{public}s", appGalleryBundleName.c_str());
Want want;
want.SetElementName(appGalleryBundleName, "");
want.SetAction(action);
want.SetParam(MARKET_CROWD_TEST_BUNDLE_PARAM, bundleName);
return DelayedSingleton<AbilityManagerService>::GetInstance()->StartAbility(want, requestCode, userId);
}
} // namespace AbilityUtil
} // namespace AAFwk
} // namespace OHOS
#endif
+1 -23
View File
@@ -20,12 +20,11 @@
#include <unordered_set>
#include "ability_config.h"
#include "ability_manager_client.h"
#include "ability_manager_errors.h"
#include "ability_window_configuration.h"
#include "app_jump_control_rule.h"
#include "bundle_mgr_helper.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "in_process_call_wrapper.h"
#include "ipc_skeleton.h"
#include "permission_verification.h"
@@ -45,8 +44,6 @@ constexpr const char* DLP_PARAMS_SANDBOX = "ohos.dlp.params.sandbox";
constexpr const char* DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName";
constexpr const char* DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName";
constexpr const char* DLP_PARAMS_ABILITY_NAME = "ohos.dlp.params.abilityName";
constexpr const char* MARKET_BUNDLE_NAME = "com.huawei.hmsapp.appgallery";
constexpr const char* MARKET_CROWD_TEST_BUNDLE_PARAM = "crowd_test_bundle_name";
constexpr const char* BUNDLE_NAME_SELECTOR_DIALOG = "com.ohos.amsdialog";
constexpr const char* JUMP_INTERCEPTOR_DIALOG_CALLER_PKG = "interceptor_callerPkg";
@@ -323,25 +320,6 @@ static constexpr int64_t MICROSECONDS = 1000000; // MICROSECONDS mean 10^6 mi
}
}
[[maybe_unused]] static int StartAppgallery(const std::string &bundleName, const int requestCode, const int32_t userId,
const std::string &action)
{
std::string appGalleryBundleName;
auto bundleMgrHelper = AbilityUtil::GetBundleManagerHelper();
if (bundleMgrHelper == nullptr || !bundleMgrHelper->QueryAppGalleryBundleName(appGalleryBundleName)) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "Get bundle manager helper failed or QueryAppGalleryBundleName failed.");
appGalleryBundleName = MARKET_BUNDLE_NAME;
}
TAG_LOGD(AAFwkTag::ABILITYMGR, "appGalleryBundleName:%{public}s", appGalleryBundleName.c_str());
Want want;
want.SetElementName(appGalleryBundleName, "");
want.SetAction(action);
want.SetParam(MARKET_CROWD_TEST_BUNDLE_PARAM, bundleName);
return AbilityManagerClient::GetInstance()->StartAbility(want, requestCode, userId);
}
inline ErrCode EdmErrorType(bool isEdm)
{
if (isEdm) {
@@ -21,7 +21,6 @@
#include "ability_debug_response_interface.h"
#include "ability_info.h"
#include "ability_manager_client.h"
#include "app_debug_listener_interface.h"
#include "application_info.h"
#include "appmgr/app_mgr_client.h"
@@ -28,6 +28,9 @@
#include "isession_handler_interface.h"
namespace OHOS {
namespace AbilityRuntime {
class IStatusBarDelegate;
}
namespace AAFwk {
class SessionInfo;
class StatusBarDelegateManager;
@@ -18,6 +18,7 @@
#include "ability_first_frame_state_data.h"
#include "ability_first_frame_state_observer_stub.h"
#include "ability_manager_errors.h"
#include "application_info.h"
#include "hilog_tag_wrapper.h"
#include "permission_verification.h"
+2 -3
View File
@@ -20,7 +20,6 @@
#include <vector>
#include <unordered_map>
#include "constants.h"
#include "ability_event_handler.h"
#include "ability_manager_service.h"
#include "ability_resident_process_rdb.h"
@@ -46,7 +45,6 @@
#include "errors.h"
#include "event_report.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "os_account_manager_wrapper.h"
#include "parameters.h"
#include "ui_extension_host_info.h"
@@ -2199,7 +2197,8 @@ void AbilityRecord::DumpUIExtensionRootHostInfo(std::vector<std::string> &info)
}
UIExtensionHostInfo hostInfo;
auto ret = IN_PROCESS_CALL(AAFwk::AbilityManagerClient::GetInstance()->GetUIExtensionRootHostInfo(token, hostInfo));
auto ret = IN_PROCESS_CALL(DelayedSingleton<AbilityManagerService>::GetInstance()->GetUIExtensionRootHostInfo(
token, hostInfo));
if (ret != ERR_OK) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "Get ui extension host info failed with %{public}d.", ret);
return;
+11 -12
View File
@@ -12,18 +12,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ability_manager_client.h"
#include "ability_manager_service.h"
#include "assert_fault_proxy.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "scene_board_judgement.h"
#include "task_handler_wrap.h"
namespace OHOS {
namespace AbilityRuntime {
namespace {
constexpr char ASSERT_FAULT_DETAIL[] = "assertFaultDialogDetail";
constexpr char UIEXTENSION_TYPE_KEY[] = "ability.want.params.uiExtensionType";
constexpr const char* ASSERT_FAULT_DETAIL = "assertFaultDialogDetail";
constexpr const char* UIEXTENSION_TYPE_KEY = "ability.want.params.uiExtensionType";
constexpr int32_t DEFAULT_VAL = 0;
constexpr int32_t INVALID_USERID = -1;
constexpr int32_t MESSAGE_PARCEL_KEY_SIZE = 3;
@@ -111,9 +110,9 @@ bool ModalSystemAssertUIExtension::CreateModalUIExtension(const AAFwk::Want &wan
return false;
}
callback->SetReqeustAssertDialogWant(want);
auto abilityManagerClient = AAFwk::AbilityManagerClient::GetInstance();
if (abilityManagerClient == nullptr) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectSystemUi AbilityManagerClient is nullptr");
auto abilityMs = DelayedSingleton<AAFwk::AbilityManagerService>::GetInstance();
if (abilityMs == nullptr) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectSystemUi abilityMs is nullptr");
TryNotifyOneWaitingThread();
return false;
}
@@ -123,7 +122,7 @@ bool ModalSystemAssertUIExtension::CreateModalUIExtension(const AAFwk::Want &wan
} else {
systemUIWant.SetElementName("com.ohos.systemui", "com.ohos.systemui.dialog");
}
auto result = abilityManagerClient->ConnectAbility(systemUIWant, callback, INVALID_USERID);
auto result = abilityMs->ConnectAbility(systemUIWant, callback, nullptr, INVALID_USERID);
if (result != ERR_OK) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "ConnectSystemUi ConnectAbility dialog failed, result = %{public}d", result);
TryNotifyOneWaitingThread();
@@ -137,9 +136,9 @@ bool ModalSystemAssertUIExtension::DisconnectSystemUI()
TAG_LOGD(AAFwkTag::ABILITYMGR, "Called.");
bool retVal = true;
do {
auto abilityManagerClient = AAFwk::AbilityManagerClient::GetInstance();
if (abilityManagerClient == nullptr) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "AbilityManagerClient is nullptr");
auto abilityMs = DelayedSingleton<AAFwk::AbilityManagerService>::GetInstance();
if (abilityMs == nullptr) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "abilityMs is nullptr");
retVal = false;
break;
}
@@ -149,7 +148,7 @@ bool ModalSystemAssertUIExtension::DisconnectSystemUI()
retVal = false;
break;
}
auto result = abilityManagerClient->DisconnectAbility(callback);
auto result = abilityMs->DisconnectAbility(callback);
if (result != ERR_OK) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "DisconnectAbility dialog failed, result = %{public}d", result);
retVal = false;
@@ -15,10 +15,10 @@
#include "disposed_observer.h"
#include "ability_manager_service.h"
#include "interceptor/disposed_rule_interceptor.h"
#include "ability_record.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "modal_system_ui_extension.h"
#include "want.h"
namespace OHOS {
@@ -56,7 +56,8 @@ void DisposedObserver::OnPageShow(const AppExecFwk::PageStateData &pageStateData
{
TAG_LOGD(AAFwkTag::ABILITYMGR, "Call");
if (disposedRule_.componentType == AppExecFwk::ComponentType::UI_ABILITY) {
int ret = IN_PROCESS_CALL(AbilityManagerClient::GetInstance()->StartAbility(*disposedRule_.want));
int ret = IN_PROCESS_CALL(DelayedSingleton<AbilityManagerService>::GetInstance()->StartAbility(
*disposedRule_.want));
if (ret != ERR_OK) {
interceptor_->UnregisterObserver(pageStateData.bundleName);
TAG_LOGE(AAFwkTag::ABILITYMGR, "failed to start disposed ability");
@@ -15,11 +15,11 @@
#include "interceptor/ability_jump_interceptor.h"
#include "ability_manager_service.h"
#include "ability_util.h"
#include "accesstoken_kit.h"
#include "app_jump_control_rule.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "hitrace_meter.h"
#include "in_process_call_wrapper.h"
#include "permission_constants.h"
@@ -75,7 +75,7 @@ ErrCode AbilityJumpInterceptor::DoProcess(AbilityInterceptorParam param)
Want dialogWant = sysDialogScheduler->GetJumpInterceptorDialogWant(targetWant);
AbilityUtil::ParseJumpInterceptorWant(dialogWant, controlRule.callerPkg);
LoadAppLabelInfo(dialogWant, controlRule, param.userId);
int ret = IN_PROCESS_CALL(AbilityManagerClient::GetInstance()->StartAbility(dialogWant,
int ret = IN_PROCESS_CALL(DelayedSingleton<AbilityManagerService>::GetInstance()->StartAbility(dialogWant,
param.requestCode, param.userId));
if (ret != ERR_OK) {
TAG_LOGI(AAFwkTag::ABILITYMGR, "appInterceptor Dialog StartAbility error, ret:%{public}d", ret);
@@ -15,10 +15,10 @@
#include "interceptor/control_interceptor.h"
#include "ability_manager_service.h"
#include "ability_util.h"
#include "app_running_control_rule_result.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "hitrace_meter.h"
#include "in_process_call_wrapper.h"
#include "want_params_wrapper.h"
@@ -57,8 +57,8 @@ ErrCode ControlInterceptor::DoProcess(AbilityInterceptorParam param)
controlWant->SetParam(INTERCEPT_MODULE_NAME, param.want.GetElement().GetModuleName());
controlRule.controlWant = controlWant;
}
int ret = IN_PROCESS_CALL(AbilityManagerClient::GetInstance()->StartAbility(*controlRule.controlWant,
param.requestCode, param.userId));
int ret = IN_PROCESS_CALL(DelayedSingleton<AbilityManagerService>::GetInstance()->StartAbility(
*controlRule.controlWant, param.requestCode, param.userId));
if (ret != ERR_OK) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "Control implicit start appgallery failed.");
return ret;
@@ -16,8 +16,8 @@
#include "interceptor/crowd_test_interceptor.h"
#include "ability_util.h"
#include "ability_service_util.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "in_process_call_wrapper.h"
#include "start_ability_utils.h"
@@ -15,10 +15,10 @@
#include "interceptor/disposed_rule_interceptor.h"
#include "ability_manager_service.h"
#include "ability_record.h"
#include "ability_util.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
#include "hitrace_meter.h"
#include "in_process_call_wrapper.h"
#include "iservice_registry.h"
@@ -54,8 +54,8 @@ ErrCode DisposedRuleInterceptor::DoProcess(AbilityInterceptorParam param)
return AbilityUtil::EdmErrorType(disposedRule.isEdm);
}
if (disposedRule.componentType == AppExecFwk::ComponentType::UI_ABILITY) {
int ret = IN_PROCESS_CALL(AbilityManagerClient::GetInstance()->StartAbility(*disposedRule.want,
param.requestCode, param.userId));
int ret = IN_PROCESS_CALL(DelayedSingleton<AbilityManagerService>::GetInstance()->StartAbility(
*disposedRule.want, param.requestCode, param.userId));
if (ret != ERR_OK) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "DisposedRuleInterceptor start ability failed.");
return ret;
@@ -21,6 +21,7 @@
#include "ability_manager_service.h"
#include "ability_util.h"
#include "common_event_manager.h"
#include "distributed_client.h"
#include "hilog_tag_wrapper.h"
#include "hilog_wrapper.h"
@@ -341,7 +342,7 @@ int32_t PendingWantManager::PendingWantPublishCommonEvent(
pendingWantCommonEvent->SetFinishedReceiver(senderInfo.finishedReceiver);
pendingWantCommonEvent->SetWantParams(senderInfo.want.GetParams());
}
bool result = IN_PROCESS_CALL(DelayedSingleton<EventFwk::CommonEvent>::GetInstance()->PublishCommonEvent(
bool result = IN_PROCESS_CALL(CommonEventManager::PublishCommonEvent(
eventData, eventPublishData, pendingWantCommonEvent, callerUid, callerTokenId));
return ((result == true) ? ERR_OK : (-1));
}
@@ -19,7 +19,6 @@
#include "app_utils.h"
#include "display_info.h"
#include "constants.h"
#include "ability_record.h"
#include "ability_util.h"
#include "app_gallery_enable_util.h"
@@ -39,98 +38,99 @@
namespace OHOS {
namespace AAFwk {
const int32_t UI_SELECTOR_DIALOG_WIDTH = 328 * 2;
const int32_t UI_SELECTOR_DIALOG_HEIGHT = 350 * 2;
const int32_t UI_SELECTOR_DIALOG_HEIGHT_NARROW = 350 * 2;
const int32_t UI_SELECTOR_DIALOG_WIDTH_NARROW = 328 * 2;
const int32_t UI_SELECTOR_DIALOG_PHONE_H1 = 240 * 2;
const int32_t UI_SELECTOR_DIALOG_PHONE_H2 = 340 * 2;
const int32_t UI_SELECTOR_DIALOG_PHONE_H3 = 350 * 2;
const int32_t UI_SELECTOR_DIALOG_PC_H0 = 1;
const int32_t UI_SELECTOR_DIALOG_PC_H2 = (64 * 2 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
const int32_t UI_SELECTOR_DIALOG_PC_H3 = (64 * 3 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
const int32_t UI_SELECTOR_DIALOG_PC_H4 = (64 * 4 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
const int32_t UI_SELECTOR_DIALOG_PC_H5 = (64 * 4 + 56 + 48 + 54 + 64 + 48 + 58 + 2) * 2;
constexpr int32_t UI_SELECTOR_DIALOG_WIDTH = 328 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_HEIGHT = 350 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_HEIGHT_NARROW = 350 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_WIDTH_NARROW = 328 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PHONE_H1 = 240 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PHONE_H2 = 340 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PHONE_H3 = 350 * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PC_H0 = 1;
constexpr int32_t UI_SELECTOR_DIALOG_PC_H2 = (64 * 2 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PC_H3 = (64 * 3 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PC_H4 = (64 * 4 + 56 + 48 + 54 + 64 + 48 + 2) * 2;
constexpr int32_t UI_SELECTOR_DIALOG_PC_H5 = (64 * 4 + 56 + 48 + 54 + 64 + 48 + 58 + 2) * 2;
const int32_t UI_SELECTOR_PORTRAIT_PHONE_H1 = 280;
const int32_t UI_SELECTOR_PORTRAIT_PHONE_H2 = 400;
const int32_t UI_SELECTOR_PORTRAIT_PHONE_H3 = 410;
const int32_t UI_SELECTOR_LANDSCAPE_SIGNAL_BAR = 24;
const int32_t UI_SELECTOR_LANDSCAPE_HEIGHT = 350;
const int32_t UI_SELECTOR_LANDSCAPE_HEIGHT_NARROW = 350;
const int32_t UI_SELECTOR_LANDSCAPE_PHONE_H1 = 280;
const int32_t UI_SELECTOR_LANDSCAPE_PHONE_H2 = 400;
const int32_t UI_SELECTOR_LANDSCAPE_PHONE_H3 = 410;
const int32_t UI_SELECTOR_LANDSCAPE_COUNT_THREE = 3;
const int32_t UI_SELECTOR_LANDSCAPE_COUNT_FOUR = 4;
const float UI_SELECTOR_LANDSCAPE_GRILLE_LARGE = 0.107692;
const float UI_SELECTOR_LANDSCAPE_GRILLE_SAMLL = 0.015385;
const float UI_SELECTOR_LANDSCAPE_MAX_RATIO = 0.9;
const float UI_SELECTOR_PORTRAIT_WIDTH_RATIO = 0.8;
const float UI_SELECTOR_PORTRAIT_WIDTH_EDGE_RATIO = 0.1;
const float UI_SELECTOR_PORTRAIT_HEIGHT_RATIO = 0.98;
constexpr int32_t UI_SELECTOR_PORTRAIT_PHONE_H1 = 280;
constexpr int32_t UI_SELECTOR_PORTRAIT_PHONE_H2 = 400;
constexpr int32_t UI_SELECTOR_PORTRAIT_PHONE_H3 = 410;
constexpr int32_t UI_SELECTOR_LANDSCAPE_SIGNAL_BAR = 24;
constexpr int32_t UI_SELECTOR_LANDSCAPE_HEIGHT = 350;
constexpr int32_t UI_SELECTOR_LANDSCAPE_HEIGHT_NARROW = 350;
constexpr int32_t UI_SELECTOR_LANDSCAPE_PHONE_H1 = 280;
constexpr int32_t UI_SELECTOR_LANDSCAPE_PHONE_H2 = 400;
constexpr int32_t UI_SELECTOR_LANDSCAPE_PHONE_H3 = 410;
constexpr int32_t UI_SELECTOR_LANDSCAPE_COUNT_THREE = 3;
constexpr int32_t UI_SELECTOR_LANDSCAPE_COUNT_FOUR = 4;
constexpr float UI_SELECTOR_LANDSCAPE_GRILLE_LARGE = 0.107692;
constexpr float UI_SELECTOR_LANDSCAPE_GRILLE_SAMLL = 0.015385;
constexpr float UI_SELECTOR_LANDSCAPE_MAX_RATIO = 0.9;
constexpr float UI_SELECTOR_PORTRAIT_WIDTH_RATIO = 0.8;
constexpr float UI_SELECTOR_PORTRAIT_WIDTH_EDGE_RATIO = 0.1;
constexpr float UI_SELECTOR_PORTRAIT_HEIGHT_RATIO = 0.98;
const int32_t UI_TIPS_DIALOG_WIDTH = 328 * 2;
const int32_t UI_TIPS_DIALOG_HEIGHT = 135 * 2;
const int32_t UI_TIPS_DIALOG_HEIGHT_NARROW = 135 * 2;
const int32_t UI_TIPS_DIALOG_WIDTH_NARROW = 328 * 2;
constexpr int32_t UI_TIPS_DIALOG_WIDTH = 328 * 2;
constexpr int32_t UI_TIPS_DIALOG_HEIGHT = 135 * 2;
constexpr int32_t UI_TIPS_DIALOG_HEIGHT_NARROW = 135 * 2;
constexpr int32_t UI_TIPS_DIALOG_WIDTH_NARROW = 328 * 2;
const int32_t UI_JUMP_INTERCEPTOR_DIALOG_WIDTH = 328 * 2;
const int32_t UI_JUMP_INTERCEPTOR_DIALOG_HEIGHT = 135 * 2;
const int32_t UI_JUMP_INTERCEPTOR_DIALOG_HEIGHT_NARROW = 135 * 2;
const int32_t UI_JUMP_INTERCEPTOR_DIALOG_WIDTH_NARROW = 328 * 2;
constexpr int32_t UI_JUMP_INTERCEPTOR_DIALOG_WIDTH = 328 * 2;
constexpr int32_t UI_JUMP_INTERCEPTOR_DIALOG_HEIGHT = 135 * 2;
constexpr int32_t UI_JUMP_INTERCEPTOR_DIALOG_HEIGHT_NARROW = 135 * 2;
constexpr int32_t UI_JUMP_INTERCEPTOR_DIALOG_WIDTH_NARROW = 328 * 2;
const int32_t UI_ANR_DIALOG_WIDTH = 328 * 2;
const int32_t UI_ANR_DIALOG_HEIGHT = 192 * 2;
const std::string APP_NAME = "appName";
const std::string IS_DEFAULT_SELECTOR = "isDefaultSelector";
const std::string OFF_SET_X = "offsetX";
const std::string OFF_SET_Y = "offsetY";
const std::string WIDTH = "width";
const std::string HEIGHT = "height";
const std::string MODEL_FLAG = "modelFlag";
const std::string ACTION = "action";
const std::string OVERSIZE_HEIGHT = "oversizeHeight";
constexpr int32_t UI_DIALOG_WIDTH = 328 * 2;
constexpr int32_t UI_DIALOG_HEIGHT = 192 * 2;
constexpr const char* APP_NAME = "appName";
constexpr const char* IS_DEFAULT_SELECTOR = "isDefaultSelector";
constexpr const char* OFF_SET_X = "offsetX";
constexpr const char* OFF_SET_Y = "offsetY";
constexpr const char* WIDTH = "width";
constexpr const char* HEIGHT = "height";
constexpr const char* MODEL_FLAG = "modelFlag";
constexpr const char* ACTION = "action";
constexpr const char* OVERSIZE_HEIGHT = "oversizeHeight";
const int32_t UI_HALF = 2;
const int32_t UI_DEFAULT_BUTTOM_CLIP = 100;
const int32_t UI_WIDTH_780DP = 1560;
const int32_t UI_DEFAULT_WIDTH = 2560;
const int32_t UI_DEFAULT_HEIGHT = 1600;
constexpr int32_t UI_HALF = 2;
constexpr int32_t UI_DEFAULT_BUTTOM_CLIP = 100;
constexpr int32_t UI_WIDTH_780DP = 1560;
constexpr int32_t UI_DEFAULT_WIDTH = 2560;
constexpr int32_t UI_DEFAULT_HEIGHT = 1600;
const std::string STR_PHONE = "phone";
const std::string STR_DEFAULT = "default";
const std::string DIALOG_NAME_ANR = "dialog_anr_service";
const std::string DIALOG_NAME_TIPS = "dialog_tips_service";
const std::string DIALOG_SELECTOR_NAME = "dialog_selector_service";
const std::string DIALOG_JUMP_INTERCEPTOR_NAME = "dialog_jump_interceptor_service";
constexpr const char* STR_PHONE = "phone";
constexpr const char* STR_DEFAULT = "default";
constexpr const char* DIALOG_NAME_TIPS = "dialog_tips_service";
constexpr const char* DIALOG_SELECTOR_NAME = "dialog_selector_service";
constexpr const char* DIALOG_JUMP_INTERCEPTOR_NAME = "dialog_jump_interceptor_service";
const std::string BUNDLE_NAME = "bundleName";
const std::string BUNDLE_NAME_DIALOG = "com.ohos.amsdialog";
const std::string DIALOG_PARAMS = "params";
const std::string DIALOG_POSITION = "position";
const std::string VERTICAL_SCREEN_DIALOG_POSITION = "landscapeScreen";
const std::string ABILITY_NAME_FREEZE_DIALOG = "SwitchUserDialog";
const std::string ABILITY_NAME_ASSERT_FAULT_DIALOG = "AssertFaultDialog";
const std::string ABILITY_NAME_TIPS_DIALOG = "TipsDialog";
const std::string ABILITY_NAME_SELECTOR_DIALOG = "SelectorDialog";
const std::string ABILITY_NAME_APPGALLERY_SELECTOR_DIALOG = "AppSelectorExtensionAbility";
const std::string UIEXTENSION_TYPE_KEY = "ability.want.params.uiExtensionType";
const std::string UIEXTENSION_SYS_COMMON_UI = "sys/commonUI";
const std::string CALLER_TOKEN = "callerToken";
const std::string ABILITY_NAME_JUMP_INTERCEPTOR_DIALOG = "JumpInterceptorDialog";
const std::string TYPE_ONLY_MATCH_WILDCARD = "reserved/wildcard";
const std::string ORIENTATION = "orientation";
constexpr const char* BUNDLE_NAME = "bundleName";
constexpr const char* BUNDLE_NAME_DIALOG = "com.ohos.amsdialog";
constexpr const char* DIALOG_PARAMS = "params";
constexpr const char* DIALOG_POSITION = "position";
constexpr const char* VERTICAL_SCREEN_DIALOG_POSITION = "landscapeScreen";
constexpr const char* ABILITY_NAME_FREEZE_DIALOG = "SwitchUserDialog";
constexpr const char* ABILITY_NAME_ASSERT_FAULT_DIALOG = "AssertFaultDialog";
constexpr const char* ABILITY_NAME_TIPS_DIALOG = "TipsDialog";
constexpr const char* ABILITY_NAME_SELECTOR_DIALOG = "SelectorDialog";
constexpr const char* ABILITY_NAME_APPGALLERY_SELECTOR_DIALOG = "AppSelectorExtensionAbility";
constexpr const char* UIEXTENSION_TYPE_KEY = "ability.want.params.uiExtensionType";
constexpr const char* UIEXTENSION_SYS_COMMON_UI = "sys/commonUI";
constexpr const char* CALLER_TOKEN = "callerToken";
constexpr const char* ABILITY_NAME_JUMP_INTERCEPTOR_DIALOG = "JumpInterceptorDialog";
constexpr const char* TYPE_ONLY_MATCH_WILDCARD = "reserved/wildcard";
constexpr const char* ORIENTATION = "orientation";
constexpr const char* ABS_CODE_PATH = "/data/app/el1/bundle/public";
constexpr const char* FILE_SEPARATOR = "/";
const int32_t LINE_NUMS_ZERO = 0;
const int32_t LINE_NUMS_TWO = 2;
const int32_t LINE_NUMS_THREE = 3;
const int32_t LINE_NUMS_FOUR = 4;
const int32_t LINE_NUMS_EIGHT = 8;
constexpr int32_t LINE_NUMS_ZERO = 0;
constexpr int32_t LINE_NUMS_TWO = 2;
constexpr int32_t LINE_NUMS_THREE = 3;
constexpr int32_t LINE_NUMS_FOUR = 4;
constexpr int32_t LINE_NUMS_EIGHT = 8;
const float WIDTH_MULTIPLE = 0.8;
const float HEIGHT_MULTIPLE = 0.3;
const float SETX_WIDTH_MULTIPLE = 0.1;
constexpr float WIDTH_MULTIPLE = 0.8;
constexpr float HEIGHT_MULTIPLE = 0.3;
constexpr float SETX_WIDTH_MULTIPLE = 0.1;
Want SystemDialogScheduler::GetTipsDialogWant(const sptr<IRemoteObject> &callerToken)
{
@@ -468,18 +468,18 @@ void SystemDialogScheduler::InitDialogPosition(DialogType type, DialogPosition &
switch (type) {
case DialogType::DIALOG_ANR:
if (position.wideScreen) {
position.width = UI_ANR_DIALOG_WIDTH;
position.height = UI_ANR_DIALOG_HEIGHT;
position.width_narrow = UI_ANR_DIALOG_WIDTH;
position.height_narrow = UI_ANR_DIALOG_HEIGHT;
position.width = UI_DIALOG_WIDTH;
position.height = UI_DIALOG_HEIGHT;
position.width_narrow = UI_DIALOG_WIDTH;
position.height_narrow = UI_DIALOG_HEIGHT;
position.align = DialogAlign::CENTER;
} else {
position.width = display->GetWidth();
position.height = display->GetHeight();
position.width_narrow = display->GetWidth();
position.height_narrow = display->GetHeight();
position.window_width = UI_ANR_DIALOG_WIDTH;
position.window_height = UI_ANR_DIALOG_HEIGHT;
position.window_width = UI_DIALOG_WIDTH;
position.window_height = UI_DIALOG_HEIGHT;
position.align = DialogAlign::CENTER;
}
break;
@@ -609,8 +609,8 @@ void SystemDialogScheduler::GetAppNameFromResource(int32_t labelId,
resConfig->SetLocaleInfo(locale);
resourceManager->UpdateResConfig(*resConfig);
std::regex pattern(std::string(AbilityBase::Constants::ABS_CODE_PATH) +
std::string(AbilityBase::Constants::FILE_SEPARATOR) + bundleInfo.name);
std::regex pattern(std::string(ABS_CODE_PATH) +
std::string(FILE_SEPARATOR) + bundleInfo.name);
for (auto hapModuleInfo : bundleInfo.hapModuleInfos) {
std::string loadPath;
TAG_LOGD(AAFwkTag::DIALOG, "make a judgment.");
+1 -1
View File
@@ -145,7 +145,7 @@ ohos_shared_library("libappms") {
deps += []
external_deps += [
"i18n:intl_util",
"window_manager:libwm",
"window_manager:libwm_lite",
"window_manager:libwsutils",
]
}
@@ -17,7 +17,7 @@
#define OHOS_ABILITY_RUNTIME_WINDOW_FOCUS_CHANGE_LISTENER_H
#ifdef SUPPORT_SCREEN
#include "window_manager.h"
#include "window_manager_lite.h"
#endif // SUPPORT_SCREEN
#include "task_handler_wrap.h"
@@ -18,7 +18,7 @@
#include "task_handler_wrap.h"
#ifdef SUPPORT_SCREEN
#include "window_manager.h"
#include "window_manager_lite.h"
#endif // SUPPORT_SCREEN
namespace OHOS {
namespace AppExecFwk {
@@ -637,7 +637,7 @@ void AppMgrServiceInner::MakeProcessName(const std::shared_ptr<AbilityInfo> &abi
if (appIndex != 0) {
processName += std::to_string(appIndex);
}
if (!specifiedProcessFlag.empty()) {
processName = (processName + ":" + specifiedProcessFlag).substr(0, MAX_SPECIFIED_PROCESS_NAME_LENGTH);
TAG_LOGI(AAFwkTag::APPMGR, "specifiedProcessFlag = %{public}s, processName = %{public}s",
@@ -4806,7 +4806,7 @@ void AppMgrServiceInner::RegisterFocusListener()
TAG_LOGE(AAFwkTag::APPMGR, "no focusListener_");
return;
}
WindowManager::GetInstance().RegisterFocusChangedListener(focusListener_);
WindowManagerLite::GetInstance().RegisterFocusChangedListener(focusListener_);
#endif // SUPPORT_SCREEN
TAG_LOGI(AAFwkTag::APPMGR, "RegisterFocusListener end");
}
@@ -4819,7 +4819,7 @@ void AppMgrServiceInner::FreeFocusListener()
TAG_LOGE(AAFwkTag::APPMGR, "no focusListener_");
return;
}
WindowManager::GetInstance().UnregisterFocusChangedListener(focusListener_);
WindowManagerLite::GetInstance().UnregisterFocusChangedListener(focusListener_);
focusListener_ = nullptr;
#endif // SUPPORT_SCREEN
TAG_LOGI(AAFwkTag::APPMGR, "FreeFocusListener end");
@@ -4908,7 +4908,7 @@ void AppMgrServiceInner::InitWindowVisibilityChangedListener()
TAG_LOGE(AAFwkTag::APPMGR, "Window visibility changed listener is nullptr.");
return;
}
WindowManager::GetInstance().RegisterVisibilityChangedListener(inner->windowVisibilityChangedListener_);
WindowManagerLite::GetInstance().RegisterVisibilityChangedListener(inner->windowVisibilityChangedListener_);
};
if (taskHandler_ == nullptr) {
@@ -4926,7 +4926,7 @@ void AppMgrServiceInner::FreeWindowVisibilityChangedListener()
TAG_LOGW(AAFwkTag::APPMGR, "Visibility listener has been freed.");
return;
}
WindowManager::GetInstance().UnregisterVisibilityChangedListener(windowVisibilityChangedListener_);
WindowManagerLite::GetInstance().UnregisterVisibilityChangedListener(windowVisibilityChangedListener_);
}
void AppMgrServiceInner::HandleWindowVisibilityChanged(
-2
View File
@@ -67,7 +67,6 @@ ohos_shared_library("libupms") {
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"c_utils:utils",
"common_event_service:cesfwk_core",
"common_event_service:cesfwk_innerkits",
"eventhandler:libeventhandler",
"graphic_2d:color_manager",
@@ -115,7 +114,6 @@ ohos_static_library("libupms_static") {
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"c_utils:utils",
"common_event_service:cesfwk_core",
"common_event_service:cesfwk_innerkits",
"hilog:libhilog",
"init:libbeget_proxy",
@@ -42,6 +42,7 @@ ohos_fuzztest("StartAbilityFuzzTest") {
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
+1
View File
@@ -58,6 +58,7 @@ ohos_moduletest("ability_moduletest") {
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
"${ability_runtime_native_path}/ability/native:ability_thread",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
@@ -26,6 +26,7 @@ ohos_moduletest("start_option_module_test") {
configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
"${ability_runtime_services_path}/abilitymgr:abilityms",
@@ -20,6 +20,7 @@
#undef protected
#include <gtest/gtest.h>
#include "ability_first_frame_state_observer_stub.h"
#include "ability_manager_errors.h"
#include "iremote_broker.h"
#include "mock/include/mock_permission_verification.h"
#include "mock/include/mock_my_flag.h"
@@ -57,7 +57,7 @@ public:
void AbilityInterceptorTest::SetUpTestCase()
{
GTEST_LOG_(INFO) << "AbilityInterceptorTest SetUpTestCase called";
AbilityManagerClient::GetInstance()->CleanAllMissions();
DelayedSingleton<AbilityManagerService>::GetInstance()->CleanAllMissions();
OHOS::DelayedSingleton<SaMgrClient>::DestroyInstance();
OHOS::DelayedSingleton<SaMgrClient>::GetInstance()->RegisterSystemAbility(
@@ -42,6 +42,7 @@ ohos_unittest("ability_manager_client_branch_test") {
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
@@ -43,6 +43,7 @@ ohos_unittest("ability_manager_proxy_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
@@ -33,6 +33,8 @@ ohos_unittest("ability_manager_service_second_test") {
configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager_base",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
@@ -55,6 +55,7 @@ ohos_unittest("ability_manager_service_third_test") {
configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
@@ -14,6 +14,7 @@
*/
#include <gtest/gtest.h>
#include "ability_manager_errors.h"
#include "ability_manager_stub_impl_mock.h"
#include "ability_scheduler.h"
#include "app_debug_listener_stub_mock.h"
@@ -47,6 +47,7 @@ ohos_unittest("ability_record_test") {
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
@@ -46,7 +46,6 @@
using namespace testing::ext;
using namespace OHOS::AppExecFwk;
using namespace OHOS::AbilityBase::Constants;
namespace OHOS {
namespace AAFwk {
@@ -56,6 +55,7 @@ const std::string DLP_BUNDLE_NAME = "com.ohos.dlpmanager";
const std::string SHELL_ASSISTANT_BUNDLENAME = "com.huawei.shell_assistant";
const std::string SHOW_ON_LOCK_SCREEN = "ShowOnLockScreen";
const std::string URI_PERMISSION_TABLE_NAME = "uri_permission";
constexpr const char* COMPRESS_PROPERTY = "compress";
}
class AbilityRecordTest : public testing::TestWithParam<OHOS::AAFwk::AbilityState> {
public:
@@ -87,7 +87,7 @@ ohos_unittest("AmsAbilityRunningRecordTest") {
]
if (ability_runtime_graphics) {
external_deps += [ "window_manager:libwm" ]
external_deps += [ "window_manager:libwm_lite" ]
}
if (ability_runtime_use_memmgr_plugin) {
+1 -1
View File
@@ -81,7 +81,7 @@ ohos_unittest("AmsWorkFlowTest") {
if (ability_runtime_graphics) {
external_deps += [
"window_manager:libwm",
"window_manager:libwm_lite",
"window_manager:libwsutils",
]
}
@@ -98,7 +98,7 @@ ohos_unittest("AmsRecentAppListTest") {
if (ability_runtime_graphics) {
external_deps += [
"window_manager:libwm",
"window_manager:libwm_lite",
"window_manager:libwsutils",
]
}
@@ -93,7 +93,7 @@ ohos_unittest("AmsServiceAppSpawnClientTest") {
]
if (ability_runtime_graphics) {
external_deps += [ "window_manager:libwm" ]
external_deps += [ "window_manager:libwm_lite" ]
}
if (ability_runtime_use_memmgr_plugin) {
@@ -103,7 +103,7 @@ ohos_unittest("AmsServiceEventDriveTest") {
}
if (ability_runtime_graphics) {
external_deps += [ "window_manager:libwm" ]
external_deps += [ "window_manager:libwm_lite" ]
}
}
@@ -101,7 +101,7 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") {
if (ability_runtime_graphics) {
external_deps += [
"window_manager:libwm",
"window_manager:libwm_lite",
"window_manager:libwsutils",
]
}
@@ -92,7 +92,7 @@ ohos_unittest("AmsServiceStartupTest") {
]
if (ability_runtime_graphics) {
external_deps += [ "window_manager:libwm" ]
external_deps += [ "window_manager:libwm_lite" ]
}
if (ability_runtime_use_memmgr_plugin) {
@@ -96,7 +96,7 @@ ohos_unittest("AMSEventHandlerTest") {
if (ability_runtime_graphics) {
external_deps += [
"window_manager:libwm",
"window_manager:libwm_lite",
"window_manager:libwsutils",
]
}
@@ -4303,7 +4303,7 @@ HWTEST_F(AppMgrServiceInnerTest, SetSupportedProcessCacheSelf_001, TestSize.Leve
EXPECT_NE(appMgrServiceInner, nullptr);
bool isSupported = false;
EXPECT_EQ(appMgrServiceInner->SetSupportedProcessCacheSelf(isSupported), CHECK_PERMISSION_FAILED);
EXPECT_EQ(appMgrServiceInner->SetSupportedProcessCacheSelf(isSupported), AAFwk::CHECK_PERMISSION_FAILED);
appMgrServiceInner->appRunningManager_ = nullptr;
EXPECT_EQ(appMgrServiceInner->SetSupportedProcessCacheSelf(isSupported), ERR_NO_INIT);
@@ -41,6 +41,7 @@ ohos_unittest("ability_context_impl_test") {
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:mission_info",
"${ability_runtime_native_path}/ability:ability_context_native",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
@@ -2014,7 +2014,7 @@ ohos_unittest("reserse_continuation_scheduler_primary_proxy_test") {
ohos_unittest("distributed_client_test") {
module_out_path = module_output_path
sources = [
"${ability_runtime_native_path}/ability/native/distributed_ability_runtime/distributed_client.cpp",
"${ability_runtime_services_path}/abilitymgr/src/distributed_client.cpp",
"${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/aakit/src/mock_ability_connect_callback.cpp",
"distributed_client_test.cpp",
]
@@ -39,6 +39,7 @@ ohos_unittest("pending_want_record_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",
+1
View File
@@ -37,6 +37,7 @@ ohos_unittest("sender_info_test") {
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",
@@ -40,6 +40,7 @@ ohos_unittest("service_extension_context_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_napi_path}/inner/napi_common:napi_common",
"${ability_runtime_native_path}/ability/native:ability_business_error",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
@@ -26,6 +26,7 @@ ohos_unittest("start_option_display_id_test") {
configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
"${ability_runtime_services_path}/abilitymgr:abilityms",
@@ -30,6 +30,7 @@ ohos_unittest("start_options_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",
+1
View File
@@ -29,6 +29,7 @@ ohos_unittest("trigger_Info_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
@@ -45,6 +45,7 @@ ohos_unittest("ui_ability_lifecycle_manager_test") {
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
"${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
"${ability_runtime_innerkits_path}/ability_manager:process_options",
"${ability_runtime_innerkits_path}/app_manager:app_manager",
@@ -40,6 +40,7 @@ ohos_unittest("want_receiver_stub_test") {
}
deps = [
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
"${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",
@@ -38,6 +38,7 @@ ohos_unittest("want_sender_proxy_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",
@@ -39,6 +39,7 @@ ohos_unittest("want_sender_stub_test") {
cflags += [ "-DBINDER_IPC_32BIT" ]
}
deps = [
"${ability_runtime_innerkits_path}/wantagent:wantagent_innerkits",
"${ability_runtime_native_path}/ability/native:abilitykit_native",
"${ability_runtime_services_path}/abilitymgr:abilityms",
"${ability_runtime_services_path}/common:perm_verification",