summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java12
-rw-r--r--libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipMovesInAllApps.kt3
2 files changed, 8 insertions, 7 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java
index c726c012c6a0..5e5f5b28a817 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java
@@ -108,7 +108,7 @@ public class PipResizeGestureHandler {
// For pinch-resize
private boolean mThresholdCrossed0;
private boolean mThresholdCrossed1;
- private boolean mUsingPinchToZoom = true;
+ private boolean mOngoingPinchToResize = false;
private float mAngle = 0;
int mFirstIndex = -1;
int mSecondIndex = -1;
@@ -236,7 +236,7 @@ public class PipResizeGestureHandler {
}
if (ev instanceof MotionEvent) {
- if (mUsingPinchToZoom) {
+ if (mOngoingPinchToResize) {
onPinchResize((MotionEvent) ev);
} else {
onDragCornerResize((MotionEvent) ev);
@@ -248,7 +248,7 @@ public class PipResizeGestureHandler {
* Checks if there is currently an on-going gesture, either drag-resize or pinch-resize.
*/
public boolean hasOngoingGesture() {
- return mCtrlType != CTRL_NONE || mUsingPinchToZoom;
+ return mCtrlType != CTRL_NONE || mOngoingPinchToResize;
}
/**
@@ -305,7 +305,7 @@ public class PipResizeGestureHandler {
case MotionEvent.ACTION_POINTER_DOWN:
if (mEnablePinchResize && ev.getPointerCount() == 2) {
onPinchResize(ev);
- mUsingPinchToZoom = true;
+ mOngoingPinchToResize = true;
return true;
}
break;
@@ -587,7 +587,7 @@ public class PipResizeGestureHandler {
// Pinch-to-resize needs to re-calculate snap fraction and animate to the snapped
// position correctly. Drag-resize does not need to move, so just finalize resize.
- if (mUsingPinchToZoom) {
+ if (mOngoingPinchToResize) {
final Rect startBounds = new Rect(mLastResizeBounds);
// If user resize is pretty close to max size, just auto resize to max.
if (mLastResizeBounds.width() >= PINCH_RESIZE_AUTO_MAX_RATIO * mMaxSize.x
@@ -612,7 +612,7 @@ public class PipResizeGestureHandler {
private void resetState() {
mCtrlType = CTRL_NONE;
mAngle = 0;
- mUsingPinchToZoom = false;
+ mOngoingPinchToResize = false;
mAllowGesture = false;
mThresholdCrossed = false;
}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipMovesInAllApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipMovesInAllApps.kt
index acc013aa8695..5713822bba99 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipMovesInAllApps.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipMovesInAllApps.kt
@@ -18,6 +18,7 @@ package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
import android.view.Surface
+import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
@@ -67,7 +68,7 @@ class PipMovesInAllApps(testSpec: FlickerTestParameter) : PipTransition(testSpec
}
}
- @Presubmit
+ @FlakyTest(bugId = 184050344)
@Test
fun pipWindowMovesUp() = testSpec.assertWmEnd {
val initialState = this.trace?.first()?.wmState