Merge "Base: Remove unused triggerThreshold field" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f636d7c542
@@ -55,10 +55,9 @@ public interface BackAnimation {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the threshold values that defining edge swipe behavior.
|
* Sets the threshold values that defining edge swipe behavior.
|
||||||
* @param triggerThreshold the min threshold to trigger back.
|
* @param progressThreshold the max threshold to keep linear progressing back animation.
|
||||||
* @param progressThreshold the max threshold to keep progressing back animation.
|
|
||||||
*/
|
*/
|
||||||
void setSwipeThresholds(float triggerThreshold, float progressThreshold);
|
void setSwipeThresholds(float progressThreshold);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the system bar listener to control the system bar color.
|
* Sets the system bar listener to control the system bar color.
|
||||||
|
|||||||
@@ -301,9 +301,9 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSwipeThresholds(float triggerThreshold, float progressThreshold) {
|
public void setSwipeThresholds(float progressThreshold) {
|
||||||
mShellExecutor.execute(() -> BackAnimationController.this.setSwipeThresholds(
|
mShellExecutor.execute(() -> BackAnimationController.this.setSwipeThresholds(
|
||||||
triggerThreshold, progressThreshold));
|
progressThreshold));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -605,7 +605,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
|
|||||||
mTouchTracker.setTriggerBack(triggerBack);
|
mTouchTracker.setTriggerBack(triggerBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSwipeThresholds(float triggerThreshold, float progressThreshold) {
|
private void setSwipeThresholds(float progressThreshold) {
|
||||||
mTouchTracker.setProgressThreshold(progressThreshold);
|
mTouchTracker.setProgressThreshold(progressThreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,8 +224,6 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
|
|||||||
private float mBottomGestureHeight;
|
private float mBottomGestureHeight;
|
||||||
// The slop to distinguish between horizontal and vertical motion
|
// The slop to distinguish between horizontal and vertical motion
|
||||||
private float mTouchSlop;
|
private float mTouchSlop;
|
||||||
// The threshold for triggering back
|
|
||||||
private float mBackSwipeTriggerThreshold;
|
|
||||||
// The threshold for back swipe full progress.
|
// The threshold for back swipe full progress.
|
||||||
private float mBackSwipeProgressThreshold;
|
private float mBackSwipeProgressThreshold;
|
||||||
// Duration after which we consider the event as longpress.
|
// Duration after which we consider the event as longpress.
|
||||||
@@ -473,8 +471,6 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
|
|||||||
final float backGestureSlop = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
|
final float backGestureSlop = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||||
SystemUiDeviceConfigFlags.BACK_GESTURE_SLOP_MULTIPLIER, 0.75f);
|
SystemUiDeviceConfigFlags.BACK_GESTURE_SLOP_MULTIPLIER, 0.75f);
|
||||||
mTouchSlop = mViewConfiguration.getScaledTouchSlop() * backGestureSlop;
|
mTouchSlop = mViewConfiguration.getScaledTouchSlop() * backGestureSlop;
|
||||||
mBackSwipeTriggerThreshold = res.getDimension(
|
|
||||||
R.dimen.navigation_edge_action_drag_threshold);
|
|
||||||
mBackSwipeProgressThreshold = res.getDimension(
|
mBackSwipeProgressThreshold = res.getDimension(
|
||||||
R.dimen.navigation_edge_action_progress_threshold);
|
R.dimen.navigation_edge_action_progress_threshold);
|
||||||
updateBackAnimationThresholds();
|
updateBackAnimationThresholds();
|
||||||
@@ -1121,7 +1117,6 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mBackAnimation.setSwipeThresholds(
|
mBackAnimation.setSwipeThresholds(
|
||||||
mBackSwipeTriggerThreshold,
|
|
||||||
Math.min(mDisplaySize.x, mBackSwipeProgressThreshold));
|
Math.min(mDisplaySize.x, mBackSwipeProgressThreshold));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user