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
This commit is contained in:
Stefan Andonian
2022-04-01 22:28:39 +00:00
parent e3589debfd
commit 253c23b2e8
+1 -3
View File
@@ -1183,6 +1183,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
mOverlayManager.onActivityResumed(this);
}
AbstractFloatingView.closeOpenViews(this, false, TYPE_ALL & ~TYPE_REBIND_SAFE);
TraceHelper.INSTANCE.endSection(traceToken);
}
@@ -1686,9 +1687,6 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
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) {