summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-02-07 17:12:36 -0800
committerJon Miranda <jonmiranda@google.com>2017-02-07 17:14:28 -0800
commitc6cf493b07fc7234c2a0a164318fd9aeb02e48f3 (patch)
tree52a64a42646c9c747d48df5a2f98179bfd479b1d /src/com/android/launcher3
parent4b20e0c312d7a6f5f0a65e8bada74eeb52c15bc0 (diff)
downloadandroid_packages_apps_Trebuchet-c6cf493b07fc7234c2a0a164318fd9aeb02e48f3.tar.gz
android_packages_apps_Trebuchet-c6cf493b07fc7234c2a0a164318fd9aeb02e48f3.tar.bz2
android_packages_apps_Trebuchet-c6cf493b07fc7234c2a0a164318fd9aeb02e48f3.zip
Add basic logs for tap outside action.
Change-Id: I6288610b9870c3abe88794c53309b1d76dd2780f
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/AbstractFloatingView.java2
-rw-r--r--src/com/android/launcher3/Launcher.java7
-rw-r--r--src/com/android/launcher3/dragndrop/DragLayer.java4
-rw-r--r--src/com/android/launcher3/folder/Folder.java6
-rw-r--r--src/com/android/launcher3/logging/UserEventDispatcher.java8
-rw-r--r--src/com/android/launcher3/popup/PopupContainerWithArrow.java5
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;
+ }
}