mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-10-07 16:33:53 +00:00
commit
43808a43d7
@ -748,7 +748,14 @@ void Ability::InitConfigurationProperties(const Configuration& changeConfigurati
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void Ability::OnMemoryLevel(int level)
|
void Ability::OnMemoryLevel(int level)
|
||||||
{}
|
{
|
||||||
|
HILOG_INFO("%{public}s start.", __func__);
|
||||||
|
if (scene_ == nullptr) {
|
||||||
|
HILOG_DEBUG("WindowScene is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scene_->NotifyMemoryLevel(level);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is like openFile, open a file that need to be able to return sub-sections of files,often assets
|
* @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_);
|
std::lock_guard<std::recursive_mutex> guard(lock_);
|
||||||
for (const auto &item : appRunningRecordMap_) {
|
for (const auto &item : appRunningRecordMap_) {
|
||||||
const auto &appRecord = item.second;
|
const auto &appRecord = item.second;
|
||||||
if (appRecord->GetState() == ApplicationState::APP_STATE_BACKGROUND) {
|
HILOG_INFO("Notification app [%{public}s]", appRecord->GetName().c_str());
|
||||||
HILOG_INFO("Notification app [%{public}s]", appRecord->GetName().c_str());
|
appRecord->ScheduleMemoryLevel(level);
|
||||||
appRecord->ScheduleMemoryLevel(level);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user