Merge "Log the event for swiping up to dismiss a task in Overview." into ub-launcher3-qt-qpr1-dev

am: 22edac9bf5

Change-Id: Iae05c668fecf84c79086cfb6821e9644ac08bb71
This commit is contained in:
Becky Qiu
2019-08-14 13:09:14 -07:00
committed by android-build-merger
3 changed files with 16 additions and 2 deletions
@@ -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) {