[Android] PiP: force actions in parameters
Duncan McNamara
git at videolan.org
Thu Jul 4 05:02:21 UTC 2024
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Thu Jun 27 16:21:14 2024 +0200| [eeae2a6797aad6a13eb6e9b9a002a3ee713d608d] | committer: Duncan McNamara
PiP: force actions in parameters
On some systems, if parameters actions are not set, the system may reuse
the previously set pip parameters, meaning that vlc-android would use
the controls set in another app. This also means that the controls may
use other pending intents than the standard PlaybackState, breaking the
controls for PiP.
> https://code.videolan.org/videolan/vlc-android/commit/eeae2a6797aad6a13eb6e9b9a002a3ee713d608d
---
.../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 1 +
1 file changed, 1 insertion(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 212609e7e4..c55f9d59cf 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -826,6 +826,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
val paramBuilder = PictureInPictureParams.Builder()
if (width != 0 && height != 0 && (width.toFloat() / height.toFloat()) in 0.418410f..2.39f)
paramBuilder.setAspectRatio(Rational(width, height))
+ paramBuilder.setActions(listOf())
service?.updateWidgetState()
enterPictureInPictureMode(paramBuilder.build())
} catch (e: IllegalArgumentException) { // Fallback with default parameters
More information about the Android
mailing list