mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-18 05:36:46 +00:00
回退Suspend打点
Signed-off-by: chenming <chenming48@huawei.com>
This commit is contained in:
parent
393a446e73
commit
fa6b84b7aa
@ -51,7 +51,6 @@ declare_args() {
|
||||
ability_runtime_ces = true
|
||||
ability_runtime_resource = true
|
||||
ability_runtime_appspawn = true
|
||||
suspend_manager = true
|
||||
|
||||
if (!defined(global_parts_info) ||
|
||||
defined(global_parts_info.account_os_account)) {
|
||||
@ -65,11 +64,6 @@ declare_args() {
|
||||
background_task_mgr_continuous_task_enable = false
|
||||
}
|
||||
|
||||
if (defined(global_parts_info) &&
|
||||
!defined(global_parts_info.resourceschedule_suspend_manager)) {
|
||||
suspend_manager = false
|
||||
}
|
||||
|
||||
if (defined(global_parts_info) &&
|
||||
!defined(global_parts_info.distributeddatamgr_distributeddataobject)) {
|
||||
distributed_data_object_enable = false
|
||||
|
@ -73,9 +73,6 @@ config("abilityms_config") {
|
||||
defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ]
|
||||
}
|
||||
|
||||
if (suspend_manager) {
|
||||
defines += [ "SUSPEND_MANAGER_ENABLE" ]
|
||||
}
|
||||
cflags = []
|
||||
if (target_cpu == "arm") {
|
||||
cflags += [ "-DBINDER_IPC_32BIT" ]
|
||||
@ -131,10 +128,6 @@ ohos_shared_library("abilityms") {
|
||||
external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
|
||||
}
|
||||
|
||||
if (suspend_manager) {
|
||||
external_deps += [ "suspend_manager:suspend_manager_client" ]
|
||||
}
|
||||
|
||||
if (ability_runtime_graphics) {
|
||||
deps += [
|
||||
"${ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr",
|
||||
|
@ -65,10 +65,6 @@
|
||||
#include "ui_service_mgr_client.h"
|
||||
#endif
|
||||
|
||||
#ifdef SUSPEND_MANAGER_ENABLE
|
||||
#include "suspend_manager_client.h"
|
||||
#endif // SUSPEND_MANAGER_ENABLE
|
||||
|
||||
using OHOS::AppExecFwk::ElementName;
|
||||
using OHOS::Security::AccessToken::AccessTokenKit;
|
||||
|
||||
@ -455,14 +451,6 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr<IRemot
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
HILOG_DEBUG("Start service or extension, name is %{public}s.", abilityInfo.name.c_str());
|
||||
#ifdef SUSPEND_MANAGER_ENABLE
|
||||
auto bms = AbilityUtil::GetBundleManager();
|
||||
if (bms) {
|
||||
SuspendManager::SuspendManagerClient::GetInstance().ThawOneApplication(
|
||||
bms->GetUidByBundleName(abilityInfo.bundleName, validUserId),
|
||||
abilityInfo.bundleName, "THAW_BY_START_NOT_PAGE_ABILITY");
|
||||
}
|
||||
#endif // SUSPEND_MANAGER_ENABLE
|
||||
return connectManager->StartAbility(abilityRequest);
|
||||
}
|
||||
|
||||
@ -475,14 +463,6 @@ int AbilityManagerService::StartAbilityInner(const Want &want, const sptr<IRemot
|
||||
HILOG_ERROR("missionListManager is nullptr. userId=%{public}d", validUserId);
|
||||
return ERR_INVALID_VALUE;
|
||||
}
|
||||
#ifdef SUSPEND_MANAGER_ENABLE
|
||||
auto bms = AbilityUtil::GetBundleManager();
|
||||
if (bms) {
|
||||
SuspendManager::SuspendManagerClient::GetInstance().ThawOneApplication(
|
||||
bms->GetUidByBundleName(abilityInfo.bundleName, validUserId),
|
||||
abilityInfo.bundleName, "THAW_BY_START_PAGE_ABILITY");
|
||||
}
|
||||
#endif // SUSPEND_MANAGER_ENABLE
|
||||
HILOG_DEBUG("Start ability, name is %{public}s.", abilityInfo.name.c_str());
|
||||
return missionListManager->StartAbility(abilityRequest);
|
||||
}
|
||||
|
@ -35,10 +35,6 @@
|
||||
#include "locale_config.h"
|
||||
#include "mission_info_mgr.h"
|
||||
#endif
|
||||
#ifdef SUSPEND_MANAGER_ENABLE
|
||||
#include "suspend_manager_client.h"
|
||||
#endif // SUSPEND_MANAGER_ENABLE
|
||||
|
||||
|
||||
namespace OHOS {
|
||||
namespace AAFwk {
|
||||
@ -263,12 +259,6 @@ void AbilityRecord::ProcessForegroundAbility(uint32_t sceneFlag)
|
||||
// background to active state
|
||||
HILOG_DEBUG("MoveToForeground, %{public}s", element.c_str());
|
||||
lifeCycleStateInfo_.sceneFlagBak = sceneFlag;
|
||||
#ifdef SUSPEND_MANAGER_ENABLE
|
||||
std::string bundleName = GetAbilityInfo().bundleName;
|
||||
int32_t uid = GetUid();
|
||||
SuspendManager::SuspendManagerClient::GetInstance().ThawOneApplication(
|
||||
uid, bundleName, "THAW_BY_FOREGROUND_ABILITY");
|
||||
#endif // SUSPEND_MANAGER_ENABLE
|
||||
DelayedSingleton<AppScheduler>::GetInstance()->MoveToForeground(token_);
|
||||
} else {
|
||||
HILOG_DEBUG("Activate %{public}s", element.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user