From 4bd472550c7360a86dc7f86067da5942b222e519 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Tue, 5 Jun 2018 16:26:32 -0700 Subject: [PATCH] Fix wrong labeling of app launch session type (HOME vs OVERVIEW) Context: onResetOverview callback should be called the moment launcher state exits from OVERVIEW. More context: When user drag and drop from overview, and happens to launch an app immediately after dropping the icon before animation finishes, that app launch is labeled as OVERVIEW and not HOME. Bug: 109747805 Change-Id: I24dc8681d6c51dfd2043fe71a1a81d6e96027ef4 --- src/com/android/launcher3/LauncherState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java index 5b010dc2d4..8a15b24f18 100644 --- a/src/com/android/launcher3/LauncherState.java +++ b/src/com/android/launcher3/LauncherState.java @@ -242,8 +242,10 @@ public class LauncherState { * Called when the start transition ends and the user settles on this particular state. */ public void onStateTransitionEnd(Launcher launcher) { - if (this == NORMAL) { + if (this == NORMAL || this == SPRING_LOADED) { UiFactory.resetOverview(launcher); + } + if (this == NORMAL) { // Clear any rotation locks when going to normal state launcher.getRotationHelper().setCurrentStateRequest(REQUEST_NONE); }