From 500669122fdd5725739a2a13f839ceb6ac574707 Mon Sep 17 00:00:00 2001 From: "yaoruozi1@huawei.com" Date: Wed, 13 Nov 2024 10:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=A1=E6=81=AF=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yaoruozi1@huawei.com --- .../native/backup_ext/src/sub_ext_extension.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frameworks/native/backup_ext/src/sub_ext_extension.cpp b/frameworks/native/backup_ext/src/sub_ext_extension.cpp index 4156f50d4..1b983404f 100644 --- a/frameworks/native/backup_ext/src/sub_ext_extension.cpp +++ b/frameworks/native/backup_ext/src/sub_ext_extension.cpp @@ -206,6 +206,10 @@ std::function BackupExtExtension::OnRestoreCallback( HILOGE("Ext extension handle have been released"); return; } + if (extensionPtr->isExecAppDone_.load()) { + HILOGE("Appdone has been executed for the current application"); + return; + } HILOGI("Current bundle will execute app done"); if (errCode == ERR_OK) { auto spendTime = extensionPtr->GetOnStartTimeCost(); @@ -242,6 +246,10 @@ std::function BackupExtExtension::OnRestoreExCallbac HILOGE("Extension handle have been released"); return; } + if (extensionPtr->isExecAppDone_.load()) { + HILOGE("Appdone has been executed for the current application"); + return; + } if (errCode == ERR_OK && !restoreRetInfo.empty()) { auto spendTime = extensionPtr->GetOnStartTimeCost(); if (spendTime >= BConstants::MAX_TIME_COST) { @@ -302,6 +310,10 @@ std::function BackupExtExtension::IncreOnRestoreExCa HILOGE("Extension handle have been released"); return; } + if (extensionPtr->isExecAppDone_.load()) { + HILOGE("Appdone has been executed for the current application"); + return; + } if (errCode == ERR_OK && !restoreRetInfo.empty()) { auto spendTime = extensionPtr->GetOnStartTimeCost(); if (spendTime >= BConstants::MAX_TIME_COST) { @@ -341,6 +353,10 @@ std::function BackupExtExtension::IncreOnRestoreCall HILOGE("Ext extension handle have been released"); return; } + if (extensionPtr->isExecAppDone_.load()) { + HILOGE("Appdone has been executed for the current application"); + return; + } HILOGI("Current bundle will execute app done"); if (errCode == ERR_OK) { auto spendTime = extensionPtr->GetOnStartTimeCost();