mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Adding tracing for a lab-only flake.
am: 9f6cde1443
Change-Id: I31ce596847aa1506cefbde711ae6ad6f3e3b777e
This commit is contained in:
@@ -26,6 +26,7 @@ import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -40,6 +41,7 @@ import com.android.launcher3.R;
|
||||
import com.android.launcher3.anim.AnimationSuccessListener;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
import com.android.quickstep.TaskOverlayFactory;
|
||||
@@ -159,6 +161,9 @@ public class TaskMenuView extends AbstractFloatingView {
|
||||
}
|
||||
|
||||
public static TaskMenuView showForTask(TaskView taskView) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WELLBEING_NO_TASK_MENU, "showForTask");
|
||||
}
|
||||
BaseDraggingActivity activity = BaseDraggingActivity.fromContext(taskView.getContext());
|
||||
final TaskMenuView taskMenuView = (TaskMenuView) activity.getLayoutInflater().inflate(
|
||||
R.layout.task_menu, activity.getDragLayer(), false);
|
||||
@@ -166,9 +171,15 @@ public class TaskMenuView extends AbstractFloatingView {
|
||||
}
|
||||
|
||||
private boolean populateAndShowForTask(TaskView taskView) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WELLBEING_NO_TASK_MENU, "populateAndShowForTask1");
|
||||
}
|
||||
if (isAttachedToWindow()) {
|
||||
return false;
|
||||
}
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WELLBEING_NO_TASK_MENU, "populateAndShowForTask2");
|
||||
}
|
||||
mActivity.getDragLayer().addView(this);
|
||||
mTaskView = taskView;
|
||||
addMenuOptions(mTaskView);
|
||||
|
||||
@@ -53,6 +53,7 @@ import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.logging.UserEventDispatcher;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
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;
|
||||
@@ -390,6 +391,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
||||
mIconView.setDrawable(icon);
|
||||
mIconView.setOnClickListener(v -> showTaskMenu(Touch.TAP));
|
||||
mIconView.setOnLongClickListener(v -> {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WELLBEING_NO_TASK_MENU, "setOnLongClickListener");
|
||||
}
|
||||
requestDisallowInterceptTouchEvent(true);
|
||||
return showTaskMenu(Touch.LONGPRESS);
|
||||
});
|
||||
|
||||
@@ -86,4 +86,5 @@ public final class TestProtocol {
|
||||
public static final String APP_NOT_DISABLED = "b/139891609";
|
||||
public static final String ALL_APPS_UPON_RECENTS = "b/139941530";
|
||||
public static final String STABLE_STATE_MISMATCH = "b/140311911";
|
||||
public static final String WELLBEING_NO_TASK_MENU = "b/141275518";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user