[DO NOT MERGE] Compatibilize with git_master
Both branches diverged, they shouldn't. This CL compatibilizes master with changes from udc-dev that were not merged upstream Bug: 237278810 Test: atest FlickerLibTest Change-Id: I451fc1d77b24ab15c3d91ba7d3b909cfb4134b28
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.wm.shell.flicker.pip
|
package com.android.wm.shell.flicker.pip
|
||||||
|
|
||||||
|
import android.platform.test.annotations.FlakyTest
|
||||||
import android.platform.test.annotations.Postsubmit
|
import android.platform.test.annotations.Postsubmit
|
||||||
import android.tools.common.Rotation
|
import android.tools.common.Rotation
|
||||||
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
|
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
|
||||||
@@ -34,6 +35,7 @@ import org.junit.runners.Parameterized
|
|||||||
@RunWith(Parameterized::class)
|
@RunWith(Parameterized::class)
|
||||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
|
@FlakyTest(bugId = 270677470)
|
||||||
class PipPinchInTest(flicker: FlickerTest) : PipTransition(flicker) {
|
class PipPinchInTest(flicker: FlickerTest) : PipTransition(flicker) {
|
||||||
override val transition: FlickerBuilder.() -> Unit
|
override val transition: FlickerBuilder.() -> Unit
|
||||||
get() = buildTransition { transitions { pipApp.pinchInPipWindow(wmHelper, 0.4f, 30) } }
|
get() = buildTransition { transitions { pipApp.pinchInPipWindow(wmHelper, 0.4f, 30) } }
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
|
|||||||
import android.app.Instrumentation;
|
import android.app.Instrumentation;
|
||||||
import android.app.UiAutomation;
|
import android.app.UiAutomation;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.InputDevice;
|
import android.view.InputDevice;
|
||||||
import android.view.InputEvent;
|
import android.view.InputEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
@@ -32,6 +33,7 @@ import androidx.annotation.Nullable;
|
|||||||
* Injects gestures given an {@link Instrumentation} object.
|
* Injects gestures given an {@link Instrumentation} object.
|
||||||
*/
|
*/
|
||||||
public class GestureHelper {
|
public class GestureHelper {
|
||||||
|
private static final String TAG = GestureHelper.class.getSimpleName();
|
||||||
// Inserted after each motion event injection.
|
// Inserted after each motion event injection.
|
||||||
private static final int MOTION_EVENT_INJECTION_DELAY_MILLIS = 5;
|
private static final int MOTION_EVENT_INJECTION_DELAY_MILLIS = 5;
|
||||||
|
|
||||||
@@ -208,6 +210,9 @@ public class GestureHelper {
|
|||||||
for (int j = 0; j < coords.length; j++) {
|
for (int j = 0; j < coords.length; j++) {
|
||||||
coords[j].x += (endPoints[j].x - startPoints[j].x) / steps;
|
coords[j].x += (endPoints[j].x - startPoints[j].x) / steps;
|
||||||
coords[j].y += (endPoints[j].y - startPoints[j].y) / steps;
|
coords[j].y += (endPoints[j].y - startPoints[j].y) / steps;
|
||||||
|
|
||||||
|
// TODO: remove logging once b/269505548 is resolved
|
||||||
|
Log.d(TAG, "(" + coords[j].x + ", " + coords[j].y + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
eventTime = SystemClock.uptimeMillis();
|
eventTime = SystemClock.uptimeMillis();
|
||||||
|
|||||||
Reference in New Issue
Block a user