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.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5b38261a4..d79230f8b 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -127,6 +127,7 @@ import com.android.launcher3.util.PackageManagerHelper;
import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.util.PendingRequestArgs;
import com.android.launcher3.util.RaceConditionTracker;
+import com.android.launcher3.util.ShortcutUtil;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.Thunk;
@@ -873,9 +874,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onStop();
}
-
- getUserEventDispatcher().logActionCommand(Action.Command.STOP,
- mStateManager.getState().containerType, -1);
+ logStopAndResume(Action.Command.STOP);
mAppWidgetHost.setListenIfResumed(false);
@@ -901,8 +900,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
private void handleDeferredResume() {
if (hasBeenResumed() && !mStateManager.getState().disableInteraction) {
- getUserEventDispatcher().logActionCommand(Action.Command.RESUME,
- mStateManager.getState().containerType, -1);
+ logStopAndResume(Action.Command.RESUME);
getUserEventDispatcher().startSession();
UiFactory.onLauncherStateOrResumeChanged(this);
@@ -929,6 +927,17 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
}
}
+ private void logStopAndResume(int command) {
+ int containerType = mStateManager.getState().containerType;
+ if (containerType == ContainerType.WORKSPACE && mWorkspace != null) {
+ getUserEventDispatcher().logActionCommand(command,
+ containerType, -1, mWorkspace.isOverlayShown() ? -1 : 0);
+ } else {
+ getUserEventDispatcher().logActionCommand(command, containerType, -1);
+ }
+
+ }
+
protected void onStateSet(LauncherState state) {
getAppWidgetHost().setResumed(state == LauncherState.NORMAL);
if (mDeferredResumePending) {
@@ -2494,7 +2503,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
KeyEvent.KEYCODE_O, KeyEvent.META_CTRL_ON));
}
if (currentFocus.getTag() instanceof ItemInfo
- && DeepShortcutManager.supportsShortcuts((ItemInfo) currentFocus.getTag())) {
+ && ShortcutUtil.supportsShortcuts((ItemInfo) currentFocus.getTag())) {
shortcutInfos.add(new KeyboardShortcutInfo(
getString(R.string.shortcuts_menu_with_notifications_description),
KeyEvent.KEYCODE_S, KeyEvent.META_CTRL_ON));