Fixed conflicts/build

This commit is contained in:
litetex 2022-07-15 19:53:48 +02:00
parent 3890d0abdb
commit 3ba04f179f
5 changed files with 36 additions and 35 deletions

View file

@ -1,7 +1,5 @@
package org.schabi.newpipe;
import static org.schabi.newpipe.MainActivity.DEBUG;
import android.content.Context;
import androidx.annotation.NonNull;

View file

@ -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) {

View file

@ -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;

View file

@ -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<StreamSegment> segments
= player.getCurrentStreamInfo().get().getStreamSegments();
final List<StreamSegment> 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;

View file

@ -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<VideoStream> availableStreams
= Optional.ofNullable(player.getCurrentMetadata())
final List<VideoStream> availableStreams = Optional.ofNullable(player.getCurrentMetadata())
.flatMap(MediaItemTag::getMaybeQuality)
.map(MediaItemTag.Quality::getSortedVideoStreams)
.orElse(null);