From 85d6aaeb909cad1d67a3f51c0a51fcbccd32382b Mon Sep 17 00:00:00 2001 From: yuwenze Date: Tue, 4 Apr 2023 03:31:28 +0000 Subject: [PATCH] fix animation on ability died Signed-off-by: yuwenze Change-Id: I20808a8fca838c49850397656eae3fe321fdf830 --- services/abilitymgr/include/ability_record.h | 1 + services/abilitymgr/src/ability_record.cpp | 20 +++++++++++++++++++ .../abilitymgr/src/mission_list_manager.cpp | 1 + 3 files changed, 22 insertions(+) diff --git a/services/abilitymgr/include/ability_record.h b/services/abilitymgr/include/ability_record.h index 861ee30a4f8..b16cf6a04a4 100644 --- a/services/abilitymgr/include/ability_record.h +++ b/services/abilitymgr/include/ability_record.h @@ -844,6 +844,7 @@ public: std::shared_ptr GetOtherMissionStackAbilityRecord() const; void SetOtherMissionStackAbilityRecord(const std::shared_ptr &abilityRecord); void RevokeUriPermission(); + void RemoveAbilityDeathRecipient() const; protected: void SendEvent(uint32_t msg, uint32_t timeOut, int32_t param = -1); diff --git a/services/abilitymgr/src/ability_record.cpp b/services/abilitymgr/src/ability_record.cpp index 762491a1862..e0bd85e34ec 100644 --- a/services/abilitymgr/src/ability_record.cpp +++ b/services/abilitymgr/src/ability_record.cpp @@ -1781,6 +1781,25 @@ void AbilityRecord::DumpService(std::vector &info, std::vectorAsObject(); + if (schedulerObject != nullptr) { + HILOG_INFO("RemoveDeathRecipient"); + schedulerObject->RemoveDeathRecipient(schedulerDeathRecipient_); + } +} + void AbilityRecord::OnSchedulerDied(const wptr &remote) { HILOG_WARN("On scheduler died."); @@ -1839,6 +1858,7 @@ void AbilityRecord::OnSchedulerDied(const wptr &remote) if (self->GetWMSHandler()) { sptr info = new AbilityTransitionInfo(); self->SetAbilityTransitionInfo(info); + HILOG_INFO("Notification WMS UIAbiltiy abnormal death."); self->GetWMSHandler()->NotifyAnimationAbilityDied(info); } }; diff --git a/services/abilitymgr/src/mission_list_manager.cpp b/services/abilitymgr/src/mission_list_manager.cpp index 3e214a1de95..79b9b7e4807 100644 --- a/services/abilitymgr/src/mission_list_manager.cpp +++ b/services/abilitymgr/src/mission_list_manager.cpp @@ -1546,6 +1546,7 @@ void MissionListManager::CompleteTerminate(const std::shared_ptr HILOG_ERROR("%{public}s, ability is not terminating.", __func__); return; } + abilityRecord->RemoveAbilityDeathRecipient(); // notify AppMS terminate if (abilityRecord->TerminateAbility() != ERR_OK) { -- Gitee