Merge "Send TaskBar touch events to tests" into sc-v2-dev am: f77d45cce8

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14736370

Change-Id: I718427af455405baffaffc89b133c70e275d2df1
This commit is contained in:
Alex Chau
2021-06-17 18:22:51 +00:00
committed by Automerger Merge Worker
@@ -19,12 +19,15 @@ import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.launcher3.R;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.views.BaseDragLayer;
import com.android.systemui.shared.system.ViewTreeObserverWrapper;
@@ -128,4 +131,10 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> {
mTaskbarBackgroundPaint.setAlpha((int) (alpha * 255));
invalidate();
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
TestLogging.recordMotionEvent(TestProtocol.SEQUENCE_MAIN, "Touch event", ev);
return super.dispatchTouchEvent(ev);
}
}