mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-10-07 16:33:53 +00:00
支持ability窗口资源释放
Signed-off-by: yihao lin <linyh@zju.edu.cn>
This commit is contained in:
parent
e853f22818
commit
7e43ebf2a6
@ -756,7 +756,13 @@ void Ability::InitConfigurationProperties(const Configuration& changeConfigurati
|
||||
*
|
||||
*/
|
||||
void Ability::OnMemoryLevel(int level)
|
||||
{}
|
||||
{
|
||||
HILOG_INFO("%{public}s start.", __func__);
|
||||
if (scene_ == nullptr) {
|
||||
HILOG_DEBUG("WindowScene is null");
|
||||
}
|
||||
scene_->NotifyMemoryLevel(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This is like openFile, open a file that need to be able to return sub-sections of files,often assets
|
||||
|
@ -494,10 +494,8 @@ int32_t AppRunningManager::NotifyMemoryLevel(int32_t level)
|
||||
std::lock_guard<std::recursive_mutex> guard(lock_);
|
||||
for (const auto &item : appRunningRecordMap_) {
|
||||
const auto &appRecord = item.second;
|
||||
if (appRecord->GetState() == ApplicationState::APP_STATE_BACKGROUND) {
|
||||
HILOG_INFO("Notification app [%{public}s]", appRecord->GetName().c_str());
|
||||
appRecord->ScheduleMemoryLevel(level);
|
||||
}
|
||||
HILOG_INFO("Notification app [%{public}s]", appRecord->GetName().c_str());
|
||||
appRecord->ScheduleMemoryLevel(level);
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user