Skip to content

Commit dcd452e

Browse files
committed
Fix Checkstyle: add final to variables/params, wrap lines, add empty line at EOF for hold-nX gesture in VideoPlayerUi.java
1 parent 4a4d30f commit dcd452e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
1111

1212
// Call this after binding and player are ready
1313
private void setupHoldNXGesture() {
14-
GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() {
14+
final GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() {
1515
@Override
16-
public void onLongPress(MotionEvent e) {
16+
public void onLongPress(final MotionEvent e) {
1717
if (!isHolding) {
1818
lastNonHoldSpeed = player.getPlaybackSpeed();
1919
// No hardcoded default: use the value already set in Tempo dialog
@@ -22,7 +22,7 @@ public void onLongPress(MotionEvent e) {
2222
}
2323
}
2424
};
25-
GestureDetector gestureDetector = new GestureDetector(context, gestureListener);
25+
final GestureDetector gestureDetector = new GestureDetector(context, gestureListener);
2626
binding.getRoot().setOnTouchListener((v, event) -> {
2727
gestureDetector.onTouchEvent(event);
2828
if ((event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) && isHolding) {
@@ -33,4 +33,4 @@ public void onLongPress(MotionEvent e) {
3333
});
3434
}
3535
// Call setupHoldNXGesture() in your initListeners() or wherever appropriate after player/binding is available.
36-
}
36+
}

0 commit comments

Comments
 (0)