Add log when user attempts to split with widget

Bug: 295467097
Flag: none

Change-Id: Ice6cdc7a2db85c8efca7d4e1bc74a0cdc367a9ab
This commit is contained in:
Vinit Nayak
2024-01-16 15:17:14 -08:00
parent fc02f88d1b
commit 701d267b05
2 changed files with 7 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
package com.android.launcher3.uioverrides;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SPLIT_WIDGET_ATTEMPT;
import android.app.ActivityOptions;
import android.app.ActivityTaskManager;
@@ -59,6 +60,9 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler {
remoteResponse.getLaunchOptions(view));
}
if (mLauncher.isSplitSelectionEnabled()) {
// Log metric
StatsLogManager.StatsLogger logger = mLauncher.getStatsLogManager().logger();
logger.log(LAUNCHER_SPLIT_WIDGET_ATTEMPT);
Toast.makeText(hostView.getContext(), R.string.split_widgets_not_supported,
Toast.LENGTH_SHORT).show();
return true;

View File

@@ -704,6 +704,9 @@ public class StatsLogManager implements ResourceBasedOverride {
@UiEvent(doc = "User tapped on install to private space system shortcut.")
LAUNCHER_PRIVATE_SPACE_INSTALL_SYSTEM_SHORTCUT_TAP(1565),
@UiEvent(doc = "User attempted to create split screen with a widget")
LAUNCHER_SPLIT_WIDGET_ATTEMPT(1604)
// ADD MORE
;