mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
修复快照制作失败binder残留问题
Signed-off-by: zhangyuhang72 <zhangyuhang72@h-partners.com> AI[0%] Human Fixed[0%] Human[100%] AI Adopted[0%] Change-Id: I849ff4fa2dca543fec644561ff49a3b189dfb4e4
This commit is contained in:
@@ -158,7 +158,6 @@ constexpr int32_t UNSPECIFIED_USERID = -2;
|
||||
constexpr int32_t JS_ERROR_EXIT = -2;
|
||||
constexpr int32_t TIME_OUT = 120;
|
||||
constexpr int32_t DEFAULT_SLEEP_TIME = 100000;
|
||||
constexpr int32_t REPORT_TEMPLATE_PROCESS_READY_DELAY_TIME = 2000;
|
||||
constexpr int32_t SNAPSHOT_START = 0;
|
||||
constexpr int32_t SNAPSHOT_FAILURE = 1;
|
||||
|
||||
@@ -4734,8 +4733,6 @@ void MainThread::DelayedReportNotifyFFRTToRss()
|
||||
needToNotifyFFRTForNewIpc_ = true;
|
||||
}
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "After notify ffrt snapshot start");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(REPORT_TEMPLATE_PROCESS_READY_DELAY_TIME));
|
||||
TAG_LOGI(AAFwkTag::APPKIT, "template process ready");
|
||||
if (appMgr_ != nullptr) {
|
||||
appMgr_->NotifyTemplateProcessReadyDone();
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ constexpr const int BASE_TEN = 10;
|
||||
constexpr const char SIGN_TERMINAL = '\0';
|
||||
constexpr int32_t DEFAULT_CONCURRENT_NUMBER = 1;
|
||||
constexpr int32_t HIPROFILER_UID = 3063;
|
||||
constexpr int32_t REPORT_TEMPLATE_PROCESS_READY_DELAY_TIME = 2000;
|
||||
|
||||
namespace {
|
||||
#define CHECK_CALLER_IS_SYSTEM_APP \
|
||||
if (!AAFwk::PermissionVerification::GetInstance()->JudgeCallerIsAllowedToUseSystemAPI()) { \
|
||||
@@ -363,7 +365,14 @@ int32_t AppMgrService::NotifyTemplateProcessReadyDone()
|
||||
return ERR_INVALID_OPERATION;
|
||||
}
|
||||
pid_t callingPid = IPCSkeleton::GetCallingPid();
|
||||
appMgrServiceInner_->HandleNotifyTemplateProcessReadyDone(callingPid);
|
||||
auto task = [appMgrServiceInner = appMgrServiceInner_, callingPid]() {
|
||||
appMgrServiceInner->HandleNotifyTemplateProcessReadyDone(callingPid);
|
||||
};
|
||||
AAFwk::TaskHandlerWrap::GetFfrtHandler()->SubmitTask(task, AAFwk::TaskAttribute{
|
||||
.taskName_ = TASK_NOTIFY_TEMPLATE_PROCESS_READY_DONE,
|
||||
.delayMillis_ = REPORT_TEMPLATE_PROCESS_READY_DELAY_TIME,
|
||||
.taskQos_ = AAFwk::TaskQoS::USER_INTERACTIVE
|
||||
});
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user