Fling to close tasks in the GestureNav can be too small.

The problem is that the velocity threshold to activate the fling
was set using pixels per second, so a better aproach would is to
use dp/s. So now there is a variable set in the dimes.xml file
called base_swift_detector_fling_release_velocity.

Test: Manually tested
Fix: 201252634
Change-Id: Ief14f25de136dead74f03cb24d2120b67900239e
This commit is contained in:
Sebastian Franco
2021-11-16 14:46:36 -06:00
parent 048a8246fa
commit 3b86202a95
5 changed files with 40 additions and 26 deletions
@@ -21,7 +21,6 @@ import android.view.MotionEvent;
import android.view.ViewConfiguration;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.Utilities;
@@ -43,13 +42,7 @@ public class BothAxesSwipeDetector extends BaseSwipeDetector {
private int mScrollDirections;
public BothAxesSwipeDetector(@NonNull Context context, @NonNull Listener l) {
this(ViewConfiguration.get(context), l, Utilities.isRtl(context.getResources()));
}
@VisibleForTesting
protected BothAxesSwipeDetector(@NonNull ViewConfiguration config, @NonNull Listener l,
boolean isRtl) {
super(config, isRtl);
super(context, ViewConfiguration.get(context), Utilities.isRtl(context.getResources()));
mListener = l;
}