[Android] Respect locked rotation setting in video player

Geoffrey Métais git at videolan.org
Tue Sep 8 12:07:23 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Sep  8 11:33:06 2015 +0200| [95ff22027721001502d8dc40cfa003226be70456] | committer: Geoffrey Métais

Respect locked rotation setting in video player

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=95ff22027721001502d8dc40cfa003226be70456
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java      |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index da26ba0..74c2dc2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -547,6 +547,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
+        //Respect user locked rotation setting
+        try {
+            if (0 == Settings.System.getInt(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION))
+                return;
+        } catch (SettingNotFoundException e) {}
+
         if (!AndroidUtil.isHoneycombOrLater())
             changeSurfaceLayout();
         super.onConfigurationChanged(newConfig);



More information about the Android mailing list