Style[gestures]: rename method to getGestureDelay

This commit is contained in:
artdeell 2025-01-02 21:34:25 +03:00 committed by Maksim Belov
parent 93924b429b
commit dd15d8a469
3 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ public class LeftClickGesture extends ValidatorGesture {
} }
@Override @Override
protected int getCheckDuration() { protected int getGestureDelay() {
return LauncherPreferences.PREF_LONGPRESS_TRIGGER; return LauncherPreferences.PREF_LONGPRESS_TRIGGER;
} }

View File

@ -30,7 +30,7 @@ public class RightClickGesture extends ValidatorGesture {
} }
@Override @Override
protected int getCheckDuration() { protected int getGestureDelay() {
return 150; return 150;
} }

View File

@ -25,7 +25,7 @@ public abstract class ValidatorGesture implements Runnable{
*/ */
public final boolean submit() { public final boolean submit() {
if(mGestureActive) return false; if(mGestureActive) return false;
mHandler.postDelayed(this, getCheckDuration()); mHandler.postDelayed(this, getGestureDelay());
mGestureActive = true; mGestureActive = true;
return true; return true;
} }
@ -55,10 +55,10 @@ public abstract class ValidatorGesture implements Runnable{
* This method will be called during gesture submission to determine the gesture check duration. * This method will be called during gesture submission to determine the gesture check duration.
* @return the required gesture check duration in milliseconds * @return the required gesture check duration in milliseconds
*/ */
protected abstract int getCheckDuration(); protected abstract int getGestureDelay();
/** /**
* This method will be called after getCheckDuration() milliseconds, if the gesture was not cancelled. * This method will be called after getGestureDelay() milliseconds, if the gesture was not cancelled.
* @return false if you want to mark this gesture as "inactive" * @return false if you want to mark this gesture as "inactive"
* true otherwise * true otherwise
*/ */