[AA+] Logs LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED event.
Bug: 178562918 Test: Manual Change-Id: I6f195b7bdfa222332a250379bb7667501cbee762
This commit is contained in:
1 parent
a9cb2fb476
commit
e9fe7f2789
2 files changed
+11
No files matched your search
@@ -396,6 +396,9 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
@UiEvent(doc = "IME is used for selecting the focused item on the AllApps screen.")
|
||||
LAUNCHER_ALLAPPS_FOCUSED_ITEM_SELECTED_WITH_IME(718),
|
||||
|
||||
@UiEvent(doc = "User long-pressed on an AllApps item.")
|
||||
LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED(719),
|
||||
|
||||
@UiEvent(doc = "Launcher entered into AllApps state with device search enabled.")
|
||||
LAUNCHER_ALLAPPS_ENTRY_WITH_DEVICE_SEARCH(720),
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import static android.view.View.VISIBLE;
|
||||
import static com.android.launcher3.LauncherState.ALL_APPS;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.View.OnLongClickListener;
|
||||
@@ -32,6 +33,7 @@ import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.dragndrop.DragController;
|
||||
import com.android.launcher3.dragndrop.DragOptions;
|
||||
import com.android.launcher3.folder.Folder;
|
||||
import com.android.launcher3.logging.StatsLogManager.StatsLogger;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.testing.TestLogging;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
@@ -86,6 +88,12 @@ public class ItemLongClickListener {
|
||||
if (!launcher.isInState(ALL_APPS) && !launcher.isInState(OVERVIEW)) return false;
|
||||
if (launcher.getWorkspace().isSwitchingState()) return false;
|
||||
|
||||
StatsLogger logger = launcher.getStatsLogManager().logger();
|
||||
if (v.getTag() instanceof ItemInfo) {
|
||||
logger.withItemInfo((ItemInfo) v.getTag());
|
||||
}
|
||||
logger.log(LAUNCHER_ALLAPPS_ITEM_LONG_PRESSED);
|
||||
|
||||
// Start the drag
|
||||
final DragController dragController = launcher.getDragController();
|
||||
dragController.addDragListener(new DragController.DragListener() {
|
||||
|
||||
Reference in new issue
Block a user