1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 16:40:32 +00:00

Remove popup shutdown gesture in favor of the new close overlay

This commit is contained in:
Mauricio Colli 2018-08-21 23:04:52 -03:00
parent a01d6eaf72
commit 8a29cfbb7e
No known key found for this signature in database
GPG Key ID: F200BFD6F29DDD85
2 changed files with 1 additions and 10 deletions

View File

@ -116,7 +116,6 @@ public final class PopupVideoPlayer extends Service {
private FloatingActionButton closeOverlayButton;
private WindowManager.LayoutParams closeOverlayLayoutParams;
private int shutdownFlingVelocity;
private int tossFlingVelocity;
private float screenWidth, screenHeight;
@ -200,7 +199,6 @@ public final class PopupVideoPlayer extends Service {
View rootView = View.inflate(this, R.layout.player_popup, null);
playerImpl.setup(rootView);
shutdownFlingVelocity = PlayerHelper.getShutdownFlingVelocity(this);
tossFlingVelocity = PlayerHelper.getTossFlingVelocity(this);
updateScreenSize();
@ -995,10 +993,7 @@ public final class PopupVideoPlayer extends Service {
final float absVelocityX = Math.abs(velocityX);
final float absVelocityY = Math.abs(velocityY);
if (absVelocityX > shutdownFlingVelocity) {
closePopup();
return true;
} else if (Math.max(absVelocityX, absVelocityY) > tossFlingVelocity) {
if (Math.max(absVelocityX, absVelocityY) > tossFlingVelocity) {
if (absVelocityX > tossFlingVelocity) popupLayoutParams.x = (int) velocityX;
if (absVelocityY > tossFlingVelocity) popupLayoutParams.y = (int) velocityY;
checkPositionBounds();

View File

@ -251,10 +251,6 @@ public class PlayerHelper {
return true;
}
public static int getShutdownFlingVelocity(@NonNull final Context context) {
return 6000;
}
public static int getTossFlingVelocity(@NonNull final Context context) {
return 2500;
}