From 5e950d26991f18b9844e2e9ab03ab6cb9767da1c Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 7 Jul 2015 23:35:11 -0400 Subject: Launcher: Close open folder when transitioning back to Workspace.State.NORMAL * There was a nasty bug that would show an open folder behind the workspace when the screen timed and was quickly resumed, or when the screen was quickly toggled off/on before the activity lifecycle callbacks could react. * Close the open folders during showWorkspace() to prevent this. Change-Id: I6e0b6f4d99bbbabb283903a9ce92da5ae22609ce Signed-off-by: Brandon McAnsh --- src/com/android/launcher3/Launcher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index c2debec43..45f46742f 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -4315,6 +4315,9 @@ public class Launcher extends Activity void showWorkspace(boolean animated, Runnable onCompleteRunnable) { if (mState != State.WORKSPACE || mWorkspace.getState() != Workspace.State.NORMAL) { boolean wasInSpringLoadedMode = (mState != State.WORKSPACE); + if (mWorkspace.getOpenFolder() != null) { + closeFolder(false); + } mWorkspace.setVisibility(View.VISIBLE); hideAppsCustomizeHelper(Workspace.State.NORMAL, animated, false, onCompleteRunnable); -- cgit v1.2.3