Send TaskBar touch events to tests

Bug: 191344757
Test: TaplTestsQuickstep.testOverview
Change-Id: I9e1a4c6d4616e5791762a6340944212e4631862e
This commit is contained in:
Alex Chau
2021-05-26 13:03:20 +01:00
parent 8b8de4ccab
commit ecc32bd227

View File

@@ -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);
}
}