!10198 avoid_area_controller.cpp UpdateAvoidAreaIfNeed 加入应用进入后台不更新状态栏的操作

Merge pull request !10198 from wzlwzl/memory_leak_avoid_area_controller
This commit is contained in:
openharmony_ci 2024-10-28 02:42:09 +00:00 committed by Gitee
commit 2cd3dc4c01
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -191,6 +191,10 @@ void AvoidAreaController::UpdateOverlayWindowIfNeed(const sptr<WindowNode>& node
bool AvoidAreaController::UpdateAvoidAreaIfNeed(const AvoidArea& avoidArea, const sptr<WindowNode>& node,
AvoidAreaType avoidAreaType)
{
if (!node->currentVisibility_) {
WLOGFD("window: %{public}u is not visible, don't update avoid area", node->GetWindowId());
return false;
}
auto iter = lastUpdatedAvoidArea_.find(node->GetWindowId());
bool needUpdate = true;
if (iter != lastUpdatedAvoidArea_.end()) {