diff --git a/services/abilitymgr/include/ability_record.h b/services/abilitymgr/include/ability_record.h index 861ee30a4f84077df4c6bb99219cc14231bb71a6..b16cf6a04a432ad458530d76700a664cf53051e9 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 762491a1862558a572ad80f40eae27fd164b9139..e0bd85e34ec8b1b9b09fd984cf0357c0245d983f 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 3e214a1de953c3100cbac24ac1aa18026bbb5609..79b9b7e4807fd6f55943a40ca91fb69ecd307ba0 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) {