From 02749c2eb251204375dcd8a18a28a4a314898ee5 Mon Sep 17 00:00:00 2001 From: yuaqiang Date: Mon, 17 Jan 2022 07:00:48 +0000 Subject: [PATCH] IssueNo:#I4RCGF:Adaptive launcher split screen mode Description:Adaptive launcher split screen mode Sig:SIG_ApplicationFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: altay Change-Id: I2dc4132e04ab01680eadf60a37a044f073713022 --- .../kits/ability/native/src/ability.cpp | 6 +++ services/abilitymgr/BUILD.gn | 1 + .../abilitymgr/include/mission_list_manager.h | 12 +++++ .../abilitymgr/src/mission_list_manager.cpp | 54 +++++++++++++++---- .../BUILD.gn | 1 + .../BUILD.gn | 1 + .../ability_connect_manage_test/BUILD.gn | 1 + .../unittest/phone/ability_dump_test/BUILD.gn | 1 + .../phone/ability_manager_proxy_test/BUILD.gn | 1 + .../ability_manager_service_test/BUILD.gn | 1 + .../phone/ability_manager_stub_test/BUILD.gn | 1 + .../phone/ability_record_test/BUILD.gn | 1 + .../ability_scheduler_proxy_test/BUILD.gn | 1 + .../ability_scheduler_stub_test/BUILD.gn | 1 + .../phone/ability_service_start_test/BUILD.gn | 1 + .../phone/ability_stack_manager_test/BUILD.gn | 1 + .../phone/ability_token_proxy_test/BUILD.gn | 1 + .../phone/ability_token_stub_test/BUILD.gn | 1 + .../ability_with_applications_test/BUILD.gn | 1 + .../phone/abilityms_appms_test/BUILD.gn | 1 + .../phone/app_scheduler_test/BUILD.gn | 1 + .../phone/configuration_test/BUILD.gn | 1 + .../phone/connection_record_test/BUILD.gn | 1 + .../phone/data_ability_manager_test/BUILD.gn | 1 + .../phone/data_ability_record_test/BUILD.gn | 1 + .../test/unittest/phone/info_test/BUILD.gn | 1 + .../kernal_system_app_manager_test/BUILD.gn | 1 + .../phone/lifecycle_deal_test/BUILD.gn | 1 + .../unittest/phone/lifecycle_test/BUILD.gn | 1 + .../lock_screen_white_list_test/BUILD.gn | 1 + .../unittest/phone/mission_list_test/BUILD.gn | 1 + .../phone/mission_record_test/BUILD.gn | 1 + .../phone/mission_stack_test/BUILD.gn | 1 + .../test/unittest/phone/mission_test/BUILD.gn | 1 + .../phone/pending_want_key_test/BUILD.gn | 1 + .../phone/pending_want_manager_test/BUILD.gn | 1 + .../phone/pending_want_record_test/BUILD.gn | 1 + .../resume_mission_container_test/BUILD.gn | 1 + .../phone/screenshot_handler_test/BUILD.gn | 1 + .../unittest/phone/sender_info_test/BUILD.gn | 1 + .../phone/terminate_ability_test/BUILD.gn | 1 + .../phone/want_receiver_proxy_test/BUILD.gn | 1 + .../phone/want_receiver_stub_test/BUILD.gn | 1 + .../phone/want_sender_info_test/BUILD.gn | 1 + .../phone/want_sender_proxy_test/BUILD.gn | 1 + .../phone/want_sender_stub_test/BUILD.gn | 1 + .../unittest/phone/wants_info_test/BUILD.gn | 1 + .../unittest/phone/window_info_test/BUILD.gn | 5 +- .../test/moduletest/dump_module_test/BUILD.gn | 1 + .../panding_want_manager_test/BUILD.gn | 1 + 50 files changed, 112 insertions(+), 11 deletions(-) mode change 100644 => 100755 services/abilitymgr/BUILD.gn mode change 100644 => 100755 services/abilitymgr/include/mission_list_manager.h mode change 100644 => 100755 services/abilitymgr/src/mission_list_manager.cpp mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_dump_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_manager_service_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_stack_manager_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/ability_with_applications_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/abilityms_appms_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/info_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/kernal_system_app_manager_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/lock_screen_white_list_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/mission_record_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/mission_stack_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/resume_mission_container_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/screenshot_handler_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/terminate_ability_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn mode change 100644 => 100755 services/abilitymgr/test/unittest/phone/window_info_test/BUILD.gn mode change 100644 => 100755 services/test/moduletest/dump_module_test/BUILD.gn mode change 100644 => 100755 services/test/moduletest/panding_want_manager_test/BUILD.gn diff --git a/frameworks/kits/ability/native/src/ability.cpp b/frameworks/kits/ability/native/src/ability.cpp index 88337ec4834..d770bb2007d 100755 --- a/frameworks/kits/ability/native/src/ability.cpp +++ b/frameworks/kits/ability/native/src/ability.cpp @@ -71,6 +71,8 @@ const std::string Ability::DMS_SESSION_ID("sessionId"); const std::string Ability::DMS_ORIGIN_DEVICE_ID("deviceId"); const int Ability::DEFAULT_DMS_SESSION_ID(0); const std::string PERMISSION_REQUIRE_FORM = "ohos.permission.REQUIRE_FORM"; +const std::string LAUNCHER_BUNDLE_NAME = "com.ohos.launcher"; +const std::string LAUNCHER_ABILITY_NAME = "com.ohos.launcher.MainAbility"; const int TARGET_VERSION_THRESHOLDS = 8; static std::mutex formLock; @@ -194,6 +196,10 @@ void Ability::OnStart(const Want &want) winType = Rosen::WindowType::WINDOW_TYPE_SYSTEM_ALARM_WINDOW; } + if (abilityInfo_->bundleName == LAUNCHER_BUNDLE_NAME && abilityInfo_->name == LAUNCHER_ABILITY_NAME) { + winType = Rosen::WindowType::WINDOW_TYPE_WALLPAPER; + } + int defualtDisplayId = Rosen::WindowScene::DEFAULT_DISPLAY_ID; int displayId = want.GetIntParam(StartOptions::STRING_DISPLAY_ID, defualtDisplayId); APP_LOGI("Ability::OnStart bundleName:%{public}s, abilityName:%{public}s, config.type:%{public}d, " diff --git a/services/abilitymgr/BUILD.gn b/services/abilitymgr/BUILD.gn old mode 100644 new mode 100755 index 2d3bd5854bd..4db6cf477fb --- a/services/abilitymgr/BUILD.gn +++ b/services/abilitymgr/BUILD.gn @@ -99,6 +99,7 @@ ohos_shared_library("abilityms") { "bytrace_standard:bytrace_core", "ces_standard:cesfwk_core", "ces_standard:cesfwk_innerkits", + "device_manager_base:devicemanagersdk", "dsoftbus_standard:softbus_client", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/include/mission_list_manager.h b/services/abilitymgr/include/mission_list_manager.h old mode 100644 new mode 100755 index fe7b0590606..94934af6d54 --- a/services/abilitymgr/include/mission_list_manager.h +++ b/services/abilitymgr/include/mission_list_manager.h @@ -20,6 +20,7 @@ #include #include +#include "foundation/distributedhardware/devicemanager/interfaces/inner_kits/native_cpp/include/device_manager.h" #include "mission_list.h" #include "mission_listener_controller.h" #include "mission_info.h" @@ -291,6 +292,7 @@ private: void HandleAbilityDiedByDefault(std::shared_ptr abilityRecord); void DelayedStartLauncher(); void BackToLauncher(); + bool IsPC(); private: int userId_; @@ -306,6 +308,16 @@ private: std::queue waittingAbilityQueue_; std::shared_ptr listenerController_; + bool isPC_ = false; + +private: +class MissionDmInitCallback : public DistributedHardware::DmInitCallback { +public: + void OnRemoteDied() override; + +public: + static bool isInit_; +}; }; } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/src/mission_list_manager.cpp b/services/abilitymgr/src/mission_list_manager.cpp old mode 100644 new mode 100755 index c934493732e..f99fffaf81a --- a/services/abilitymgr/src/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission_list_manager.cpp @@ -225,9 +225,11 @@ int MissionListManager::StartAbilityLocked(const std::shared_ptr // 4. move target list to top MoveMissionListToTop(targetList); - // ability is already foreground, process next ability. - if (targetAbilityRecord->IsAbilityState(AbilityState::FOREGROUND_NEW) || - targetAbilityRecord->IsAbilityState(AbilityState::FOREGROUNDING_NEW)) { + // ability is already foreground, process next ability, excepting for launcher's MainAbility. + if ((abilityRequest.abilityInfo.bundleName != AbilityConfig::LAUNCHER_BUNDLE_NAME || + abilityRequest.abilityInfo.name != AbilityConfig::LAUNCHER_ABILITY_NAME) && + (targetAbilityRecord->IsAbilityState(AbilityState::FOREGROUND_NEW) || + targetAbilityRecord->IsAbilityState(AbilityState::FOREGROUNDING_NEW))) { PostStartWaittingAbility(); return 0; } @@ -834,8 +836,8 @@ int MissionListManager::TerminateAbilityLocked(const std::shared_ptrGetAbilityState()); return; } - // 3. if the launcher is foreground, just background - std::shared_ptr launcherRoot = launcherList_->GetLauncherRoot(); - if (launcherRoot - && (launcherRoot->IsAbilityState(FOREGROUND_NEW) || launcherRoot->IsAbilityState(FOREGROUNDING_NEW))) { - HILOG_DEBUG("launcherRoot state is %{public}d, no need to schedule next", launcherRoot->GetAbilityState()); + // 3. if run on a laptop, noting to do + if (IsPC()) { + HILOG_DEBUG("Run on a laptop, no need to schedule next ability."); return; } @@ -1494,5 +1494,39 @@ void MissionListManager::DumpMission(int missionId, std::vector &in } innerMissionInfo.Dump(info); } + +bool MissionListManager::IsPC() +{ + if (MissionDmInitCallback::isInit_) { + return isPC_; + } + std::string pkgName = "ohos.aafwk.aafwk_standard"; + auto callback = std::make_shared(); + int32_t ret = DistributedHardware::DeviceManager::GetInstance().InitDeviceManager(pkgName, callback); + if (ret != ERR_OK) { + HILOG_WARN("DeviceManager initialization failed."); + return false; + } + DistributedHardware::DmDeviceInfo deviceInfo; + ret = DistributedHardware::DeviceManager::GetInstance().GetLocalDeviceInfo(pkgName, deviceInfo); + if (ret != ERR_OK) { + HILOG_WARN("Failed to get local device info."); + return false; + } + MissionDmInitCallback::isInit_ = true; + if (deviceInfo.deviceTypeId != DistributedHardware::DmDeviceType::DEVICE_TYPE_PC) { + HILOG_WARN("The device is not a laptop."); + return false; + } + isPC_ = true; + return isPC_; +} + +bool MissionListManager::MissionDmInitCallback::isInit_ = false; +void MissionListManager::MissionDmInitCallback::OnRemoteDied() +{ + isInit_ = false; + HILOG_WARN("DeviceManager died."); +} } // namespace AAFwk } // namespace OHOS diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn old mode 100644 new mode 100755 index 94aa03013e1..215fdcc7110 --- a/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_callback_proxy_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("ability_connect_callback_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "native_appdatamgr:native_appdatafwk", diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn old mode 100644 new mode 100755 index fd1cd1f9e76..5bbb5de0a52 --- a/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_callback_stub_test/BUILD.gn @@ -56,6 +56,7 @@ ohos_unittest("ability_connect_callback_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "native_appdatamgr:native_appdatafwk", diff --git a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn old mode 100644 new mode 100755 index ba350b68f5a..2a4e3dc356c --- a/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_connect_manage_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("ability_connect_manage_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_dump_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_dump_test/BUILD.gn old mode 100644 new mode 100755 index 498cebb9e6f..32eda339f78 --- a/services/abilitymgr/test/unittest/phone/ability_dump_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_dump_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("ability_dump_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn old mode 100644 new mode 100755 index c9544c35af7..cbbd9d92c73 --- a/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_proxy_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("ability_manager_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_service_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_service_test/BUILD.gn old mode 100644 new mode 100755 index 4c94d19bef9..c009c4861b1 --- a/services/abilitymgr/test/unittest/phone/ability_manager_service_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_service_test/BUILD.gn @@ -56,6 +56,7 @@ ohos_unittest("ability_manager_service_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "dsoftbus_standard:softbus_client", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", diff --git a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn old mode 100644 new mode 100755 index 60c946931fb..ab291df138b --- a/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_manager_stub_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("ability_manager_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn old mode 100644 new mode 100755 index 247113d0853..89e6a357deb --- a/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_record_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("ability_record_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn old mode 100644 new mode 100755 index 5de3fc977c2..5b514830c30 --- a/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_scheduler_proxy_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("ability_scheduler_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn old mode 100644 new mode 100755 index c2f31b6f33d..cd5d88a06d6 --- a/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_scheduler_stub_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("ability_scheduler_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn old mode 100644 new mode 100755 index 2bf3808316f..85f5bca0ec0 --- a/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_service_start_test/BUILD.gn @@ -56,6 +56,7 @@ ohos_unittest("ability_service_start_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/BUILD.gn old mode 100644 new mode 100755 index e070ffda7ab..b4d124879b5 --- a/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_stack_manager_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("ability_stack_manager_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn old mode 100644 new mode 100755 index 320add42c33..9b27d486bab --- a/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_token_proxy_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("ability_token_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn old mode 100644 new mode 100755 index 4d1e01ba33e..0bcde4faba3 --- a/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_token_stub_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("ability_token_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/ability_with_applications_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/ability_with_applications_test/BUILD.gn old mode 100644 new mode 100755 index 408f698d259..36747ec1ef1 --- a/services/abilitymgr/test/unittest/phone/ability_with_applications_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/ability_with_applications_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("ability_with_applications_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/abilityms_appms_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/abilityms_appms_test/BUILD.gn old mode 100644 new mode 100755 index 7bcd6966c88..cf8269a4432 --- a/services/abilitymgr/test/unittest/phone/abilityms_appms_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/abilityms_appms_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("abilityms_appms_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn old mode 100644 new mode 100755 index f843d15dbe8..b09837c9081 --- a/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/app_scheduler_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("app_scheduler_test") { external_deps = [ "bytrace_standard:bytrace_core", + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn old mode 100644 new mode 100755 index 29157e5b794..22748119476 --- a/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/configuration_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("configuration_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn old mode 100644 new mode 100755 index 66529649fc9..8a243addce5 --- a/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/connection_record_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("connection_record_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn old mode 100644 new mode 100755 index 10ae2540c82..c8351bb4c2d --- a/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/data_ability_manager_test/BUILD.gn @@ -65,6 +65,7 @@ ohos_unittest("data_ability_manager_test") { external_deps = [ "bytrace_standard:bytrace_core", + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn old mode 100644 new mode 100755 index 70c3105f017..e34746c7d08 --- a/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/data_ability_record_test/BUILD.gn @@ -62,6 +62,7 @@ ohos_unittest("data_ability_record_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/info_test/BUILD.gn old mode 100644 new mode 100755 index 41dbdd2586e..1d6833a41ca --- a/services/abilitymgr/test/unittest/phone/info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/info_test/BUILD.gn @@ -56,6 +56,7 @@ ohos_unittest("info_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/kernal_system_app_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/kernal_system_app_manager_test/BUILD.gn old mode 100644 new mode 100755 index 4e172d30e5f..819a8a9ea42 --- a/services/abilitymgr/test/unittest/phone/kernal_system_app_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/kernal_system_app_manager_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("kernal_system_app_mgr_test") { "//utils/native/base:utils", ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn old mode 100644 new mode 100755 index 8edba73096b..ae9a4bf934a --- a/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/lifecycle_deal_test/BUILD.gn @@ -57,6 +57,7 @@ ohos_unittest("lifecycle_deal_test") { external_deps = [ "appexecfwk_standard:appexecfwk_core", + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn old mode 100644 new mode 100755 index 2c7297675cb..b70cccba253 --- a/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/lifecycle_test/BUILD.gn @@ -56,6 +56,7 @@ ohos_unittest("lifecycle_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/lock_screen_white_list_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/lock_screen_white_list_test/BUILD.gn old mode 100644 new mode 100755 index 80a2dc77c96..cd5efa82381 --- a/services/abilitymgr/test/unittest/phone/lock_screen_white_list_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/lock_screen_white_list_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("lock_screen_white_list_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn old mode 100644 new mode 100755 index 454dab4eda1..4043a0c4380 --- a/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_list_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("mission_list_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_record_test/BUILD.gn old mode 100644 new mode 100755 index 6c37b041dd4..667db98935b --- a/services/abilitymgr/test/unittest/phone/mission_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_record_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("mission_record_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_stack_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_stack_test/BUILD.gn old mode 100644 new mode 100755 index 13a234b25d5..74fe45da489 --- a/services/abilitymgr/test/unittest/phone/mission_stack_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_stack_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("mission_stack_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn old mode 100644 new mode 100755 index 489cfdde2bd..8b9d2eba566 --- a/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/mission_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("mission_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn old mode 100644 new mode 100755 index 3191ad1751c..9169e2588a9 --- a/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_key_test/BUILD.gn @@ -49,6 +49,7 @@ ohos_unittest("pending_want_key_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn old mode 100644 new mode 100755 index e29d3b5d95f..79cbf1684c1 --- a/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_manager_test/BUILD.gn @@ -53,6 +53,7 @@ ohos_unittest("pending_want_manager_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn old mode 100644 new mode 100755 index 114ee6fe3d6..d43668377a4 --- a/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/pending_want_record_test/BUILD.gn @@ -53,6 +53,7 @@ ohos_unittest("pending_want_record_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/resume_mission_container_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/resume_mission_container_test/BUILD.gn old mode 100644 new mode 100755 index c4c685ffc5c..f3ea45c9961 --- a/services/abilitymgr/test/unittest/phone/resume_mission_container_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/resume_mission_container_test/BUILD.gn @@ -52,6 +52,7 @@ ohos_unittest("resume_mission_container_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/screenshot_handler_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/screenshot_handler_test/BUILD.gn old mode 100644 new mode 100755 index c4c5034a2b0..38be394fb85 --- a/services/abilitymgr/test/unittest/phone/screenshot_handler_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/screenshot_handler_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("ability_screenshot_handler_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn old mode 100644 new mode 100755 index 0bfa842aa67..9b27cd4a63c --- a/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/sender_info_test/BUILD.gn @@ -53,6 +53,7 @@ ohos_unittest("sender_info_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/terminate_ability_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/terminate_ability_test/BUILD.gn old mode 100644 new mode 100755 index 18b4afcebaf..286648fff4b --- a/services/abilitymgr/test/unittest/phone/terminate_ability_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/terminate_ability_test/BUILD.gn @@ -58,6 +58,7 @@ ohos_unittest("terminate_ability_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn old mode 100644 new mode 100755 index 86e08792cf6..e3ea25eb8e6 --- a/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_receiver_proxy_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("want_receiver_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn old mode 100644 new mode 100755 index 5cbc3bd8ff3..17f13b351f1 --- a/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_receiver_stub_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("want_receiver_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn old mode 100644 new mode 100755 index 19c4dfb8ae6..0e34973f8f1 --- a/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_info_test/BUILD.gn @@ -53,6 +53,7 @@ ohos_unittest("want_sender_info_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn old mode 100644 new mode 100755 index ea4c4fb58c3..e23a4bc996d --- a/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_proxy_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("want_sender_proxy_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn old mode 100644 new mode 100755 index ad4e608abb3..696b0315a73 --- a/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/want_sender_stub_test/BUILD.gn @@ -55,6 +55,7 @@ ohos_unittest("want_sender_stub_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn old mode 100644 new mode 100755 index 8ce4376366c..db378634e80 --- a/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/wants_info_test/BUILD.gn @@ -54,6 +54,7 @@ ohos_unittest("wants_info_test") { ] external_deps = [ + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/abilitymgr/test/unittest/phone/window_info_test/BUILD.gn b/services/abilitymgr/test/unittest/phone/window_info_test/BUILD.gn old mode 100644 new mode 100755 index ce5cbf6dbfd..fd4c3073e9f --- a/services/abilitymgr/test/unittest/phone/window_info_test/BUILD.gn +++ b/services/abilitymgr/test/unittest/phone/window_info_test/BUILD.gn @@ -44,7 +44,10 @@ ohos_unittest("window_info_test") { "//third_party/googletest:gtest_main", ] - external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + external_deps = [ + "device_manager_base:devicemanagersdk", + "hiviewdfx_hilog_native:libhilog", + ] } group("unittest") { diff --git a/services/test/moduletest/dump_module_test/BUILD.gn b/services/test/moduletest/dump_module_test/BUILD.gn old mode 100644 new mode 100755 index 264dc405001..1bb6a118f19 --- a/services/test/moduletest/dump_module_test/BUILD.gn +++ b/services/test/moduletest/dump_module_test/BUILD.gn @@ -62,6 +62,7 @@ ohos_moduletest("dump_module_test") { external_deps = [ "bytrace_standard:bytrace_core", + "device_manager_base:devicemanagersdk", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] diff --git a/services/test/moduletest/panding_want_manager_test/BUILD.gn b/services/test/moduletest/panding_want_manager_test/BUILD.gn old mode 100644 new mode 100755 index 36928d3e212..15852fa759c --- a/services/test/moduletest/panding_want_manager_test/BUILD.gn +++ b/services/test/moduletest/panding_want_manager_test/BUILD.gn @@ -70,6 +70,7 @@ ohos_moduletest("PandingWantMgrTest") { "bytrace_standard:bytrace_core", "ces_standard:cesfwk_core", "ces_standard:cesfwk_innerkits", + "device_manager_base:devicemanagersdk", "dsoftbus_standard:softbus_client", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", -- Gitee