Skip to content

Commit 80d0396

Browse files
committed
Fix VideoPlayerUi.kt bindings and annotations for refactor branch compatibility
1 parent 9d559b1 commit 80d0396

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.schabi.newpipe.player.ui
22

3+
import android.annotation.SuppressLint
34
import android.content.Intent
45
import android.content.res.Resources
56
import android.graphics.Bitmap
@@ -223,7 +224,7 @@ abstract class VideoPlayerUi protected constructor(
223224
ShareUtils.copyToClipboard(context, player.videoUrlAtCurrentTime)
224225
true
225226
}
226-
binding.fullScreenButton.setOnClickListener(
227+
binding.fullscreenToggleButtonSecondaryMenu.setOnClickListener(
227228
makeOnClickListener {
228229
player.setRecovery()
229230
NavigationHelper.playOnMainPlayer(
@@ -303,8 +304,8 @@ abstract class VideoPlayerUi protected constructor(
303304
binding.moreOptionsButton.setOnLongClickListener(null)
304305
binding.share.setOnClickListener(null)
305306
binding.share.setOnLongClickListener(null)
306-
binding.fullScreenButton.setOnClickListener(null)
307-
binding.screenRotationButton.setOnClickListener(null)
307+
binding.fullscreenToggleButtonSecondaryMenu.setOnClickListener(null)
308+
binding.fullscreenToggleButton.setOnClickListener(null)
308309
binding.playWithKodi.setOnClickListener(null)
309310
binding.openInBrowser.setOnClickListener(null)
310311
binding.playerCloseButton.setOnClickListener(null)
@@ -962,6 +963,8 @@ abstract class VideoPlayerUi protected constructor(
962963
player.toggleShuffleModeEnabled()
963964
}
964965

966+
// TODO: don’t reference internal exoplayer2 resources
967+
@SuppressLint("PrivateResource")
965968
override fun onRepeatModeChanged(@RepeatMode repeatMode: Int) {
966969
super.onRepeatModeChanged(repeatMode)
967970

@@ -1477,7 +1480,7 @@ abstract class VideoPlayerUi protected constructor(
14771480
if (player.currentState == STATE_PLAYING && !isSomePopupMenuVisible) {
14781481
if (v == binding.playPauseButton ||
14791482
// Hide controls in fullscreen immediately
1480-
(v == binding.screenRotationButton && isFullscreen)
1483+
(v == binding.fullscreenToggleButton && isFullscreen)
14811484
) {
14821485
hideControls(0, 0)
14831486
} else {

0 commit comments

Comments
 (0)