From 3ba04f179fb3d6b5ad9505ed663d1e09b0579cd3 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Fri, 15 Jul 2022 19:53:48 +0200 Subject: [PATCH] Fixed conflicts/build --- .../org/schabi/newpipe/DownloaderImpl.java | 2 - .../fragments/detail/VideoDetailFragment.java | 5 ++- .../notification/NotificationConstants.java | 39 ++++++++++--------- .../newpipe/player/ui/MainPlayerUi.java | 18 +++++---- .../newpipe/player/ui/VideoPlayerUi.java | 7 ++-- 5 files changed, 36 insertions(+), 35 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/DownloaderImpl.java b/app/src/main/java/org/schabi/newpipe/DownloaderImpl.java index 3579a0bad..74ca39e12 100644 --- a/app/src/main/java/org/schabi/newpipe/DownloaderImpl.java +++ b/app/src/main/java/org/schabi/newpipe/DownloaderImpl.java @@ -1,7 +1,5 @@ package org.schabi.newpipe; -import static org.schabi.newpipe.MainActivity.DEBUG; - import android.content.Context; import androidx.annotation.NonNull; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index a24f667a7..55a6f5d5b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1555,8 +1555,8 @@ public final class VideoDetailFragment binding.detailUploaderThumbnailView.setVisibility(View.GONE); } - final Drawable buddyDrawable - = AppCompatResources.getDrawable(activity, R.drawable.placeholder_person); + final Drawable buddyDrawable = + AppCompatResources.getDrawable(activity, R.drawable.placeholder_person); binding.detailSubChannelThumbnailView.setImageDrawable(buddyDrawable); binding.detailUploaderThumbnailView.setImageDrawable(buddyDrawable); @@ -2030,6 +2030,7 @@ public final class VideoDetailFragment } // Listener implementation + @Override public void hideSystemUiIfNeeded() { if (isFullscreen() && bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) { diff --git a/app/src/main/java/org/schabi/newpipe/player/notification/NotificationConstants.java b/app/src/main/java/org/schabi/newpipe/player/notification/NotificationConstants.java index 53ef752bd..b8e39e564 100644 --- a/app/src/main/java/org/schabi/newpipe/player/notification/NotificationConstants.java +++ b/app/src/main/java/org/schabi/newpipe/player/notification/NotificationConstants.java @@ -30,25 +30,26 @@ public final class NotificationConstants { // Intent actions //////////////////////////////////////////////////////////////////////////*/ - public static final String ACTION_CLOSE - = App.PACKAGE_NAME + ".player.MainPlayer.CLOSE"; - public static final String ACTION_PLAY_PAUSE - = App.PACKAGE_NAME + ".player.MainPlayer.PLAY_PAUSE"; - public static final String ACTION_REPEAT - = App.PACKAGE_NAME + ".player.MainPlayer.REPEAT"; - public static final String ACTION_PLAY_NEXT - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_PLAY_NEXT"; - public static final String ACTION_PLAY_PREVIOUS - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_PLAY_PREVIOUS"; - public static final String ACTION_FAST_REWIND - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_FAST_REWIND"; - public static final String ACTION_FAST_FORWARD - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_FAST_FORWARD"; - public static final String ACTION_SHUFFLE - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_SHUFFLE"; - public static final String ACTION_RECREATE_NOTIFICATION - = App.PACKAGE_NAME + ".player.MainPlayer.ACTION_RECREATE_NOTIFICATION"; - + private static final String BASE_ACTION = + App.PACKAGE_NAME + ".player.MainPlayer."; + public static final String ACTION_CLOSE = + BASE_ACTION + "CLOSE"; + public static final String ACTION_PLAY_PAUSE = + BASE_ACTION + ".player.MainPlayer.PLAY_PAUSE"; + public static final String ACTION_REPEAT = + BASE_ACTION + ".player.MainPlayer.REPEAT"; + public static final String ACTION_PLAY_NEXT = + BASE_ACTION + ".player.MainPlayer.ACTION_PLAY_NEXT"; + public static final String ACTION_PLAY_PREVIOUS = + BASE_ACTION + ".player.MainPlayer.ACTION_PLAY_PREVIOUS"; + public static final String ACTION_FAST_REWIND = + BASE_ACTION + ".player.MainPlayer.ACTION_FAST_REWIND"; + public static final String ACTION_FAST_FORWARD = + BASE_ACTION + ".player.MainPlayer.ACTION_FAST_FORWARD"; + public static final String ACTION_SHUFFLE = + BASE_ACTION + ".player.MainPlayer.ACTION_SHUFFLE"; + public static final String ACTION_RECREATE_NOTIFICATION = + BASE_ACTION + ".player.MainPlayer.ACTION_RECREATE_NOTIFICATION"; public static final int NOTHING = 0; diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java index 52a486add..81dc954d1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java +++ b/app/src/main/java/org/schabi/newpipe/player/ui/MainPlayerUi.java @@ -534,8 +534,8 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh binding.brightnessProgressBar.setMax(maxGestureLength); setInitialGestureValues(); - binding.itemsListPanel.getLayoutParams().height - = height - binding.itemsListPanel.getTop(); + binding.itemsListPanel.getLayoutParams().height = + height - binding.itemsListPanel.getTop(); } } @@ -710,8 +710,9 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh } int nearestPosition = 0; - final List segments - = player.getCurrentStreamInfo().get().getStreamSegments(); + final List segments = player.getCurrentStreamInfo() + .get() + .getStreamSegments(); for (int i = 0; i < segments.size(); i++) { if (segments.get(i).getStartTimeSeconds() * 1000L > playbackPosition) { @@ -912,8 +913,8 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh if (DEBUG) { Log.d(TAG, "toggleFullscreen() called"); } - final PlayerServiceEventListener fragmentListener - = player.getFragmentListener().orElse(null); + final PlayerServiceEventListener fragmentListener = player.getFragmentListener() + .orElse(null); if (fragmentListener == null || player.exoPlayerIsNull()) { return; } @@ -939,8 +940,9 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh public void checkLandscape() { // check if landscape is correct - final boolean videoInLandscapeButNotInFullscreen - = isLandscape() && !isFullscreen && !player.isAudioOnly(); + final boolean videoInLandscapeButNotInFullscreen = isLandscape() + && !isFullscreen + && !player.isAudioOnly(); final boolean notPaused = player.getCurrentState() != STATE_COMPLETED && player.getCurrentState() != STATE_PAUSED; diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java index d38c8cfe4..217dd38b3 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java +++ b/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java @@ -226,8 +226,8 @@ public abstract class VideoPlayerUi extends PlayerUi // PlaybackControlRoot already consumed window insets but we should pass them to // player_overlays and fast_seek_overlay too. Without it they will be off-centered. - onLayoutChangeListener - = (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> { + onLayoutChangeListener = + (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> { binding.playerOverlays.setPadding( v.getPaddingLeft(), v.getPaddingTop(), @@ -1053,8 +1053,7 @@ public abstract class VideoPlayerUi extends PlayerUi } qualityPopupMenu.getMenu().removeGroup(POPUP_MENU_ID_QUALITY); - @Nullable final List availableStreams - = Optional.ofNullable(player.getCurrentMetadata()) + final List availableStreams = Optional.ofNullable(player.getCurrentMetadata()) .flatMap(MediaItemTag::getMaybeQuality) .map(MediaItemTag.Quality::getSortedVideoStreams) .orElse(null);