| Index: athena/resource_manager/resource_manager_impl.cc
|
| diff --git a/athena/resource_manager/resource_manager_impl.cc b/athena/resource_manager/resource_manager_impl.cc
|
| index 42351a0a6121fc75105487f56eb478a1218b9a2b..7ae3714ecb82a82ee35666810c2d406e27f094a2 100644
|
| --- a/athena/resource_manager/resource_manager_impl.cc
|
| +++ b/athena/resource_manager/resource_manager_impl.cc
|
| @@ -175,8 +175,10 @@ void ResourceManagerImpl::OnOverviewModeEnter() {
|
|
|
| void ResourceManagerImpl::OnOverviewModeExit() {
|
| in_overview_mode_ = false;
|
| - // Reorder the activities.
|
| + // Reorder the activities and manage the resources again since an order change
|
| + // might have caused a visibility change.
|
| UpdateActivityOrder();
|
| + ManageResource();
|
| }
|
|
|
| void ResourceManagerImpl::OnSplitViewModeEnter() {
|
| @@ -281,11 +283,13 @@ void ResourceManagerImpl::ManageResource() {
|
| Activity::ACTIVITY_INVISIBLE;
|
| // Only change the state when it changes. Note that when the memory
|
| // pressure is critical, only the primary activities (1 or 2) are made
|
| - // visible. Furthermore, in relaxed mode we only want to make visible.
|
| + // visible. Furthermore, in relaxed mode we only want to turn visible,
|
| + // never invisible.
|
| if (visiblity_state != state &&
|
| (current_memory_pressure_ != MEMORY_PRESSURE_LOW ||
|
| - visiblity_state == Activity::ACTIVITY_VISIBLE))
|
| + visiblity_state == Activity::ACTIVITY_VISIBLE)) {
|
| activity->SetCurrentState(visiblity_state);
|
| + }
|
| }
|
|
|
| // See which index we should handle next.
|
|
|