summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 57a9b161f..0b80751ef 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1345,19 +1345,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
if (isActionMain) {
if (!internalStateHandled) {
- // Note: There should be at most one log per method call. This is enforced
- // implicitly by using if-else statements.
- UserEventDispatcher ued = getUserEventDispatcher();
- AbstractFloatingView topOpenView = AbstractFloatingView.getTopOpenView(this);
- if (topOpenView != null) {
- topOpenView.logActionCommand(Action.Command.HOME_INTENT);
- } else if (alreadyOnHome) {
- Target target = newContainerTarget(mStateManager.getState().containerType);
- target.pageIndex = mWorkspace.getCurrentPage();
- ued.logActionCommand(Action.Command.HOME_INTENT, target,
- newContainerTarget(ContainerType.WORKSPACE));
- }
-
// In all these cases, only animate if we're already on home
AbstractFloatingView.closeAllOpenViews(this, isStarted());
@@ -1377,6 +1364,13 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
}
}
+ // Handle HOME_INTENT
+ UserEventDispatcher ued = getUserEventDispatcher();
+ Target target = newContainerTarget(mStateManager.getState().containerType);
+ target.pageIndex = mWorkspace.getCurrentPage();
+ ued.logActionCommand(Action.Command.HOME_INTENT, target,
+ newContainerTarget(ContainerType.WORKSPACE));
+
final View v = getWindow().peekDecorView();
if (v != null && v.getWindowToken() != null) {
UiThreadHelper.hideKeyboardAsync(this, v.getWindowToken());