Close open folders when pausing launcher.
Previously, folders wouldn't close after launching an app and quickly navigating back the launcher.
This is because the onStop state which contains a call to AbstractFloatingView.closeViews() wasn't being called.
This change adds an additional call to specifically close any open folders when the Launcher enters a paused state.
Bug: 227142635
Test: Verified that the issue is fixed after code change.
I logged the Launcher's lifecycle state to ensure my manual testing was reliable.
Change-Id: I838f992f83afdd754672ebbe85d0eb2a7e894417
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 1cead11..a2c6804 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1183,6 +1183,7 @@
mOverlayManager.onActivityResumed(this);
}
+ AbstractFloatingView.closeOpenViews(this, false, TYPE_ALL & ~TYPE_REBIND_SAFE);
TraceHelper.INSTANCE.endSection(traceToken);
}
@@ -1686,9 +1687,6 @@
outState.remove(RUNTIME_STATE_WIDGET_PANEL);
}
- // We close any open folders and shortcut containers that are not safe for rebind,
- // and we need to make sure this state is reflected.
- AbstractFloatingView.closeOpenViews(this, false, TYPE_ALL & ~TYPE_REBIND_SAFE);
finishAutoCancelActionMode();
if (mPendingRequestArgs != null) {