diff --git a/frameworks/native/backup_kit_inner/src/b_incremental_backup_session.cpp b/frameworks/native/backup_kit_inner/src/b_incremental_backup_session.cpp index 2413f9de2c924e93829c94914ea79e362906f8b9..731e23cdf17a063940fb63225dc28ac998d2e14d 100644 --- a/frameworks/native/backup_kit_inner/src/b_incremental_backup_session.cpp +++ b/frameworks/native/backup_kit_inner/src/b_incremental_backup_session.cpp @@ -26,18 +26,7 @@ using namespace std; BIncrementalBackupSession::~BIncrementalBackupSession() { - if (!deathRecipient_) { - HILOGI("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BIncrementalBackupSession Destory"); deathRecipient_ = nullptr; } diff --git a/frameworks/native/backup_kit_inner/src/b_incremental_restore_session.cpp b/frameworks/native/backup_kit_inner/src/b_incremental_restore_session.cpp index 461763e155b61289ba42b9c628c199a27ca806fd..b0f8179ce497d9ff0f98c35df7c28ea1678e66f8 100644 --- a/frameworks/native/backup_kit_inner/src/b_incremental_restore_session.cpp +++ b/frameworks/native/backup_kit_inner/src/b_incremental_restore_session.cpp @@ -26,18 +26,7 @@ using namespace std; BIncrementalRestoreSession::~BIncrementalRestoreSession() { - if (!deathRecipient_) { - HILOGI("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BIncrementalRestoreSession Destory"); deathRecipient_ = nullptr; } diff --git a/frameworks/native/backup_kit_inner/src/b_incremental_session_restore_async.cpp b/frameworks/native/backup_kit_inner/src/b_incremental_session_restore_async.cpp index fa1eb76249137cccb4ee3021af71337c31658d95..d5925422f0c999f0480e18526af4313ef2f0831e 100644 --- a/frameworks/native/backup_kit_inner/src/b_incremental_session_restore_async.cpp +++ b/frameworks/native/backup_kit_inner/src/b_incremental_session_restore_async.cpp @@ -27,18 +27,7 @@ using namespace std; BIncrementalSessionRestoreAsync::~BIncrementalSessionRestoreAsync() { - if (!deathRecipient_) { - HILOGE("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BIncrementalSessionRestoreAsync Destory"); callbacks_ = {}; deathRecipient_ = nullptr; } diff --git a/frameworks/native/backup_kit_inner/src/b_session_backup.cpp b/frameworks/native/backup_kit_inner/src/b_session_backup.cpp index cbecc9896307c7d527d08c734268f76ce233776c..863d696d5098672c16def83003596ef783c5e349 100644 --- a/frameworks/native/backup_kit_inner/src/b_session_backup.cpp +++ b/frameworks/native/backup_kit_inner/src/b_session_backup.cpp @@ -26,18 +26,7 @@ using namespace std; BSessionBackup::~BSessionBackup() { - if (!deathRecipient_) { - HILOGI("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BSessionBackup Destory"); deathRecipient_ = nullptr; } diff --git a/frameworks/native/backup_kit_inner/src/b_session_restore.cpp b/frameworks/native/backup_kit_inner/src/b_session_restore.cpp index d0a9d164498737cb1e8a66655559b731b4fdf760..501b054ba468f71860bcdfdb969fb2c0255e7d02 100644 --- a/frameworks/native/backup_kit_inner/src/b_session_restore.cpp +++ b/frameworks/native/backup_kit_inner/src/b_session_restore.cpp @@ -26,18 +26,7 @@ using namespace std; BSessionRestore::~BSessionRestore() { - if (!deathRecipient_) { - HILOGI("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BSessionRestore Destory"); deathRecipient_ = nullptr; } diff --git a/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp b/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp index f3f5276bdc7a551aa6eb79edf402b9122eac3e99..8cc600b95df81a125bcc2b91d181641410eac516 100644 --- a/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp +++ b/frameworks/native/backup_kit_inner/src/b_session_restore_async.cpp @@ -29,18 +29,7 @@ using namespace std; BSessionRestoreAsync::~BSessionRestoreAsync() { - if (!deathRecipient_) { - HILOGI("Death Recipient is nullptr"); - return; - } - auto proxy = ServiceClient::GetServiceProxyPointer(); - if (proxy == nullptr) { - return; - } - auto remoteObject = proxy->AsObject(); - if (remoteObject != nullptr) { - remoteObject->RemoveDeathRecipient(deathRecipient_); - } + HILOGE("BSessionRestoreAsync Destory"); callbacks_ = {}; deathRecipient_ = nullptr; }