mirror of
https://gitee.com/openharmony/resourceschedule_background_task_mgr
synced 2024-11-27 17:11:02 +00:00
发布逻辑修复&&日志整改
Signed-off-by: lipengfei <lipengfei53@huawei.com>
This commit is contained in:
parent
bfcbdd5583
commit
d456b98377
@ -61,7 +61,10 @@ private:
|
||||
#define BGTASK_PRINT_LOG(LEVEL, Level, fmt, ...) \
|
||||
if (BackgroundTaskMgr::BgTaskMgrLogWrapper::JudgeLevel(BackgroundTaskMgr::BgTaskMgrLogLevel::LEVEL)) \
|
||||
OHOS::HiviewDFX::HiLog::Level(BackgroundTaskMgr::BGTASK_MGR_LABEL, \
|
||||
fmt, \
|
||||
"[%{public}s(%{public}s):%{public}d] " fmt, \
|
||||
OHOS::BackgroundTaskMgr::BgTaskMgrLogWrapper::GetBriefFileName(__FILE__).c_str(), \
|
||||
__FUNCTION__, \
|
||||
__LINE__, \
|
||||
##__VA_ARGS__)
|
||||
|
||||
#define BGTASK_LOGD(fmt, ...) BGTASK_PRINT_LOG(DEBUG, Debug, fmt, ##__VA_ARGS__)
|
||||
|
@ -75,6 +75,7 @@ void BackgroundTaskMgrService::PublishIfReady()
|
||||
if (handler_) {
|
||||
handler_->PostTask(task, DELAY_TIME);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!Publish(DelayedSingleton<BackgroundTaskMgrService>::GetInstance().get())) {
|
||||
BGTASK_LOGE("Service start failed!");
|
||||
|
@ -732,7 +732,7 @@ bool BgEfficiencyResourcesMgr::RemoveTargetResourceRecord(std::unordered_map<int
|
||||
auto callbackInfo = std::make_shared<ResourceCallbackInfo>(iter->second->GetUid(),
|
||||
iter->second->GetPid(), eraseBit, iter->second->GetBundleName());
|
||||
BGTASK_LOGI("remove record from info map, mapkey %{public}d, uid: %{public}d, bundle name: %{public}s"
|
||||
"erasebit %{public}d", mapKey, callbackInfo->GetUid(), callbackInfo->GetBundleName().c_str(), eraseBit);
|
||||
" erasebit %{public}d", mapKey, callbackInfo->GetUid(), callbackInfo->GetBundleName().c_str(), eraseBit);
|
||||
subscriberMgr_->OnResourceChanged(callbackInfo, type);
|
||||
if (iter->second->resourceNumber_ == 0) {
|
||||
infoMap.erase(iter);
|
||||
|
Loading…
Reference in New Issue
Block a user