Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GestureDetectorCompat. #6637

Merged
merged 1 commit into from
Jul 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/src/main/java/org/schabi/newpipe/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import android.util.Log;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down Expand Up @@ -55,6 +54,7 @@
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.core.content.ContextCompat;
import androidx.core.view.DisplayCutoutCompat;
import androidx.core.view.GestureDetectorCompat;
import androidx.core.view.ViewCompat;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.ItemTouchHelper;
Expand Down Expand Up @@ -123,10 +123,10 @@
import org.schabi.newpipe.player.resolver.VideoPlaybackResolver;
import org.schabi.newpipe.util.DeviceUtils;
import org.schabi.newpipe.util.ImageDisplayConstants;
import org.schabi.newpipe.util.external_communication.KoreUtils;
import org.schabi.newpipe.util.ListHelper;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.SerializedCache;
import org.schabi.newpipe.util.external_communication.KoreUtils;
import org.schabi.newpipe.util.external_communication.ShareUtils;
import org.schabi.newpipe.views.ExpandableSurfaceView;

Expand Down Expand Up @@ -353,7 +353,7 @@ public final class Player implements
private static final float MAX_GESTURE_LENGTH = 0.75f;

private int maxGestureLength; // scaled
private GestureDetector gestureDetector;
private GestureDetectorCompat gestureDetector;

/*//////////////////////////////////////////////////////////////////////////
// Listeners and disposables
Expand Down Expand Up @@ -517,7 +517,7 @@ private void initListeners() {
binding.playbackLiveSync.setOnClickListener(this);

final PlayerGestureListener listener = new PlayerGestureListener(this, service);
gestureDetector = new GestureDetector(context, listener);
gestureDetector = new GestureDetectorCompat(context, listener);
binding.getRoot().setOnTouchListener(listener);

binding.queueButton.setOnClickListener(this);
Expand Down Expand Up @@ -4125,7 +4125,7 @@ public AudioReactor getAudioReactor() {
return audioReactor;
}

public GestureDetector getGestureDetector() {
public GestureDetectorCompat getGestureDetector() {
return gestureDetector;
}

Expand Down