diff options
Diffstat (limited to 'src/com/android/launcher3')
6 files changed, 31 insertions, 1 deletions
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java index c834c6bdb..52a83dcdf 100644 --- a/src/com/android/launcher3/AbstractFloatingView.java +++ b/src/com/android/launcher3/AbstractFloatingView.java @@ -121,4 +121,6 @@ public abstract class AbstractFloatingView extends LinearLayout { public static AbstractFloatingView getTopOpenView(Launcher launcher) { return getOpenView(launcher, TYPE_FOLDER | TYPE_POPUP_CONTAINER_WITH_ARROW); } + + public abstract int getLogContainerType(); } diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index d963f4379..826f686d4 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -111,6 +111,7 @@ import com.android.launcher3.pageindicators.PageIndicator; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.shortcuts.DeepShortcutManager; import com.android.launcher3.shortcuts.ShortcutKey; +import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType; @@ -2272,7 +2273,11 @@ public class Launcher extends BaseActivity if (v instanceof CellLayout) { if (mWorkspace.isInOverviewMode()) { - mWorkspace.snapToPageFromOverView(mWorkspace.indexOfChild(v)); + int page = mWorkspace.indexOfChild(v); + getUserEventDispatcher().logActionOnContainer(LauncherLogProto.Action.Type.TOUCH, + LauncherLogProto.Action.Direction.NONE, + LauncherLogProto.ContainerType.OVERVIEW, page); + mWorkspace.snapToPageFromOverView(page); showWorkspace(true); } return; diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java index 1be40f7e2..23a257767 100644 --- a/src/com/android/launcher3/dragndrop/DragLayer.java +++ b/src/com/android/launcher3/dragndrop/DragLayer.java @@ -57,6 +57,8 @@ import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.folder.Folder; import com.android.launcher3.folder.FolderIcon; import com.android.launcher3.keyboard.ViewGroupFocusHelper; +import com.android.launcher3.logging.LoggerUtils; +import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.util.Thunk; import com.android.launcher3.util.TouchController; @@ -192,6 +194,8 @@ public class DragLayer extends InsettableFrameLayout { return true; } } else { + mLauncher.getUserEventDispatcher().logActionTapOutside( + LoggerUtils.newContainerTarget(topView.getLogContainerType())); topView.close(true); // We let touches on the original icon go through so that users can launch diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index 876c3c4de..eacea4add 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -74,6 +74,7 @@ import com.android.launcher3.dragndrop.DragController.DragListener; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.pageindicators.PageIndicatorDots; +import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.Target; import com.android.launcher3.util.CircleRevealOutlineProvider; @@ -1532,4 +1533,9 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC public static Folder getOpen(Launcher launcher) { return getOpenView(launcher, TYPE_FOLDER); } + + @Override + public int getLogContainerType() { + return ContainerType.FOLDER; + } } diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index b4b62a864..5f45c6176 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -28,6 +28,7 @@ import com.android.launcher3.DropTarget; import com.android.launcher3.ItemInfo; import com.android.launcher3.Utilities; import com.android.launcher3.config.ProviderConfig; +import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent; @@ -196,6 +197,13 @@ public class UserEventDispatcher { dispatchUserEvent(event, null); } + public void logActionTapOutside(Target target) { + LauncherEvent event = newLauncherEvent(newTouchAction(Action.Type.TOUCH), + target); + event.action.isOutside = true; + dispatchUserEvent(event, null); + } + public void logActionOnContainer(int action, int dir, int containerType) { logActionOnContainer(action, dir, containerType, 0); } diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index b8e2dc8a8..7fda8b531 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -825,4 +825,9 @@ public class PopupContainerWithArrow extends AbstractFloatingView public static PopupContainerWithArrow getOpen(Launcher launcher) { return getOpenView(launcher, TYPE_POPUP_CONTAINER_WITH_ARROW); } + + @Override + public int getLogContainerType() { + return ContainerType.DEEPSHORTCUTS; + } } |