Disallow scrolling if workspace is in transition.
Because going to overview mode scales down the workspace, it was
thinking the touch was moving even though your finger was still. If
the "movement" was large enough, it was treated as a scroll, causing
jank. This was especially prevalent on tablets due to their size.
Bug: 25779718
Change-Id: Idb7833e0087bd24ca840f6afc451bf221f6bc047
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
index 3391d06..83b12a9 100644
--- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java
+++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
@@ -641,11 +641,11 @@
}
animation.play(reveal);
}
-
- dispatchOnLauncherTransitionPrepare(fromView, animated, true);
- dispatchOnLauncherTransitionPrepare(toView, animated, true);
}
+ dispatchOnLauncherTransitionPrepare(fromView, animated, true);
+ dispatchOnLauncherTransitionPrepare(toView, animated, true);
+
animation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index f046fbd..88a4c19 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1544,6 +1544,13 @@
}
@Override
+ protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
+ if (!isSwitchingState()) {
+ super.determineScrollingStart(ev, touchSlopScale);
+ }
+ }
+
+ @Override
public void announceForAccessibility(CharSequence text) {
// Don't announce if apps is on top of us.
if (!mLauncher.isAppsViewVisible()) {