修改信息上报机制

Signed-off-by: yaoruozi1@huawei.com <yaoruozi1@huawei.com>
This commit is contained in:
yaoruozi1@huawei.com 2024-11-13 10:51:05 +08:00
parent d9e9409f6f
commit 500669122f

View File

@ -206,6 +206,10 @@ std::function<void(ErrCode, std::string)> BackupExtExtension::OnRestoreCallback(
HILOGE("Ext extension handle have been released"); HILOGE("Ext extension handle have been released");
return; return;
} }
if (extensionPtr->isExecAppDone_.load()) {
HILOGE("Appdone has been executed for the current application");
return;
}
HILOGI("Current bundle will execute app done"); HILOGI("Current bundle will execute app done");
if (errCode == ERR_OK) { if (errCode == ERR_OK) {
auto spendTime = extensionPtr->GetOnStartTimeCost(); auto spendTime = extensionPtr->GetOnStartTimeCost();
@ -242,6 +246,10 @@ std::function<void(ErrCode, std::string)> BackupExtExtension::OnRestoreExCallbac
HILOGE("Extension handle have been released"); HILOGE("Extension handle have been released");
return; return;
} }
if (extensionPtr->isExecAppDone_.load()) {
HILOGE("Appdone has been executed for the current application");
return;
}
if (errCode == ERR_OK && !restoreRetInfo.empty()) { if (errCode == ERR_OK && !restoreRetInfo.empty()) {
auto spendTime = extensionPtr->GetOnStartTimeCost(); auto spendTime = extensionPtr->GetOnStartTimeCost();
if (spendTime >= BConstants::MAX_TIME_COST) { if (spendTime >= BConstants::MAX_TIME_COST) {
@ -302,6 +310,10 @@ std::function<void(ErrCode, std::string)> BackupExtExtension::IncreOnRestoreExCa
HILOGE("Extension handle have been released"); HILOGE("Extension handle have been released");
return; return;
} }
if (extensionPtr->isExecAppDone_.load()) {
HILOGE("Appdone has been executed for the current application");
return;
}
if (errCode == ERR_OK && !restoreRetInfo.empty()) { if (errCode == ERR_OK && !restoreRetInfo.empty()) {
auto spendTime = extensionPtr->GetOnStartTimeCost(); auto spendTime = extensionPtr->GetOnStartTimeCost();
if (spendTime >= BConstants::MAX_TIME_COST) { if (spendTime >= BConstants::MAX_TIME_COST) {
@ -341,6 +353,10 @@ std::function<void(ErrCode, std::string)> BackupExtExtension::IncreOnRestoreCall
HILOGE("Ext extension handle have been released"); HILOGE("Ext extension handle have been released");
return; return;
} }
if (extensionPtr->isExecAppDone_.load()) {
HILOGE("Appdone has been executed for the current application");
return;
}
HILOGI("Current bundle will execute app done"); HILOGI("Current bundle will execute app done");
if (errCode == ERR_OK) { if (errCode == ERR_OK) {
auto spendTime = extensionPtr->GetOnStartTimeCost(); auto spendTime = extensionPtr->GetOnStartTimeCost();