Merge "Reduce long press timeout on edge back gesture" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4b4a138f16
@@ -66,6 +66,7 @@ import java.util.concurrent.Executor;
|
|||||||
public class EdgeBackGestureHandler implements DisplayListener {
|
public class EdgeBackGestureHandler implements DisplayListener {
|
||||||
|
|
||||||
private static final String TAG = "EdgeBackGestureHandler";
|
private static final String TAG = "EdgeBackGestureHandler";
|
||||||
|
private static final int MAX_LONG_PRESS_TIMEOUT = 250;
|
||||||
|
|
||||||
private final IPinnedStackListener.Stub mImeChangedListener = new IPinnedStackListener.Stub() {
|
private final IPinnedStackListener.Stub mImeChangedListener = new IPinnedStackListener.Stub() {
|
||||||
@Override
|
@Override
|
||||||
@@ -168,7 +169,8 @@ public class EdgeBackGestureHandler implements DisplayListener {
|
|||||||
// before the app starts to react to it.
|
// before the app starts to react to it.
|
||||||
// TODO(b/130352502) Tune this value and extract into a constant
|
// TODO(b/130352502) Tune this value and extract into a constant
|
||||||
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 0.75f;
|
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 0.75f;
|
||||||
mLongPressTimeout = ViewConfiguration.getLongPressTimeout();
|
mLongPressTimeout = Math.min(MAX_LONG_PRESS_TIMEOUT,
|
||||||
|
ViewConfiguration.getLongPressTimeout());
|
||||||
|
|
||||||
mNavBarHeight = res.getDimensionPixelSize(R.dimen.navigation_bar_frame_height);
|
mNavBarHeight = res.getDimensionPixelSize(R.dimen.navigation_bar_frame_height);
|
||||||
mMinArrowPosition = res.getDimensionPixelSize(R.dimen.navigation_edge_arrow_min_y);
|
mMinArrowPosition = res.getDimensionPixelSize(R.dimen.navigation_edge_arrow_min_y);
|
||||||
|
|||||||
Reference in New Issue
Block a user