summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorBecky Qiu <xuqiu@google.com>2019-08-14 17:48:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-08-14 17:48:45 +0000
commit22edac9bf5b2bde5555eab1b8bb0027f86935577 (patch)
treee045ffb61ad3fe752c8f4ca0ecac4c33bb978a0a /quickstep
parentb13fdc8d6f05d8d732ee4382f8cbbaf7e84f43b9 (diff)
parent90ea00b39908c5e999b54a629fb2d5dca85a0b04 (diff)
downloadandroid_packages_apps_Trebuchet-22edac9bf5b2bde5555eab1b8bb0027f86935577.tar.gz
android_packages_apps_Trebuchet-22edac9bf5b2bde5555eab1b8bb0027f86935577.tar.bz2
android_packages_apps_Trebuchet-22edac9bf5b2bde5555eab1b8bb0027f86935577.zip
Merge "Log the event for swiping up to dismiss a task in Overview." into ub-launcher3-qt-qpr1-dev
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java6
-rw-r--r--quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java11
2 files changed, 15 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 9b157d163..1bf77f53c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -97,6 +97,7 @@ import com.android.launcher3.graphics.RotationMode;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
+import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.OverScroller;
import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.Themes;
@@ -1051,9 +1052,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
if (task != null) {
ActivityManagerWrapper.getInstance().removeTask(task.key.id);
if (shouldLog) {
+ ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
- onEndListener.logAction, Direction.UP, index,
- TaskUtils.getLaunchComponentKeyForTask(task.key));
+ onEndListener.logAction, Direction.UP, index, componentKey);
+ mActivity.getStatsLogManager().logTaskDismiss(this, componentKey);
}
}
}
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index 2f411efc7..13a8dc26a 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -25,6 +25,7 @@ import static android.stats.launcher.nano.Launcher.ALLAPPS;
import static android.stats.launcher.nano.Launcher.HOME;
import static android.stats.launcher.nano.Launcher.LAUNCH_APP;
import static android.stats.launcher.nano.Launcher.LAUNCH_TASK;
+import static android.stats.launcher.nano.Launcher.DISMISS_TASK;
import static android.stats.launcher.nano.Launcher.BACKGROUND;
import static android.stats.launcher.nano.Launcher.OVERVIEW;
@@ -74,6 +75,16 @@ public class StatsLogCompatManager extends StatsLogManager {
MessageNano.toByteArray(ext), true);
}
+ @Override
+ public void logTaskDismiss(View v, ComponentKey componentKey) {
+ LauncherExtension ext = new LauncherExtension();
+ ext.srcTarget = new LauncherTarget[SUPPORTED_TARGET_DEPTH];
+ int srcState = OVERVIEW;
+ fillInLauncherExtension(v, ext);
+ StatsLogCompat.write(DISMISS_TASK, srcState, BACKGROUND /* dstState */,
+ MessageNano.toByteArray(ext), true);
+ }
+
public static boolean fillInLauncherExtension(View v, LauncherExtension extension) {
StatsLogUtils.LogContainerProvider provider = StatsLogUtils.getLaunchProviderRecursive(v);
if (v == null || !(v.getTag() instanceof ItemInfo) || provider == null) {