Skip to content

Commit

Permalink
Style[gestures]: rename method to getGestureDelay
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell committed Jan 2, 2025
1 parent 93924b4 commit dd15d8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final void inputEvent() {
}

@Override
protected int getCheckDuration() {
protected int getGestureDelay() {
return LauncherPreferences.PREF_LONGPRESS_TRIGGER;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void setMotion(float deltaX, float deltaY) {
}

@Override
protected int getCheckDuration() {
protected int getGestureDelay() {
return 150;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public ValidatorGesture(Handler mHandler) {
*/
public final boolean submit() {
if(mGestureActive) return false;
mHandler.postDelayed(this, getCheckDuration());
mHandler.postDelayed(this, getGestureDelay());
mGestureActive = true;
return true;
}
Expand Down Expand Up @@ -55,10 +55,10 @@ public final void run() {
* This method will be called during gesture submission to determine the gesture check duration.
* @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"
* true otherwise
*/
Expand Down

0 comments on commit dd15d8a

Please sign in to comment.