Add CUJ-LAUNCHER_OPEN_ALL_APPS instrumentation from taskbar
Added instrumentation when allapps is opened by button click in the
taskbar. Starting the slice in the onClickListener of the allApps button
and ending it on the end of the animation.
Test: checked the trace
Fixes: b/270128563
Flag: None
Change-Id: I492a4a7af81e0c40dc3d7d415ffc7b16c057b25d
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
index 486e53c..c841cac 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
@@ -23,6 +23,9 @@
import android.view.MotionEvent;
import android.view.View;
+import com.android.internal.jank.Cuj;
+import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
+
/**
* Callbacks for {@link TaskbarView} to interact with its controller.
*/
@@ -45,6 +48,8 @@
public View.OnClickListener getAllAppsButtonClickListener() {
return v -> {
+ InteractionJankMonitorWrapper.begin(v, Cuj.CUJ_LAUNCHER_OPEN_ALL_APPS,
+ /* tag= */ "TASKBAR_BUTTON");
mActivity.getStatsLogManager().logger().log(LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP);
mControllers.taskbarAllAppsController.toggle();
};
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java
index b1c5151..ba4fa45 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java
@@ -20,6 +20,7 @@
import androidx.annotation.Nullable;
+import com.android.internal.jank.Cuj;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.allapps.AllAppsTransitionListener;
import com.android.launcher3.anim.PendingAnimation;
@@ -31,6 +32,7 @@
import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext;
import com.android.launcher3.taskbar.overlay.TaskbarOverlayController;
import com.android.launcher3.util.DisplayController;
+import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import java.util.Optional;
@@ -136,6 +138,9 @@
&& mAppsView.getSearchUiManager().getEditText() != null) {
mAppsView.getSearchUiManager().getEditText().requestFocus();
}
+ if (toAllApps) {
+ InteractionJankMonitorWrapper.end(Cuj.CUJ_LAUNCHER_OPEN_ALL_APPS);
+ }
}
/** Invoked on back press, returning {@code true} if the search session handled it. */