[Android] Fix wrong video ratio when changing the locale

Nicolas Pomepuy git at videolan.org
Tue Nov 8 16:51:42 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Nov  8 07:38:13 2022 +0100| [572bed25c38e3cade922615efcefa66b21d83489] | committer: Duncan McNamara

Fix wrong video ratio when changing the locale

Fixes #2475
This was due to a change in the appcompat dependency. See https://android-review.googlesource.com/c/platform/frameworks/support/+/2137592 and https://android-review.googlesource.com/c/platform/frameworks/support/+/2137592/6/appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatActivity.java

> https://code.videolan.org/videolan/vlc-android/commit/572bed25c38e3cade922615efcefa66b21d83489
---

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 30a2a92ea..c7f3a544e 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
@@ -715,6 +715,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
     }
 
     override fun onConfigurationChanged(newConfig: Configuration) {
+        this.resources.configuration.orientation = newConfig.orientation
         super.onConfigurationChanged(newConfig)
 
         if (::touchDelegate.isInitialized) {
@@ -726,7 +727,6 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
                     newConfig.orientation)
             touchDelegate.screenConfig = sc
         }
-        this.resources.configuration.orientation = newConfig.orientation
         overlayDelegate.resetHudLayout()
         overlayDelegate.showControls(isShowing)
         statsDelegate.onConfigurationChanged()



More information about the Android mailing list