[Android] Benchmark: fix crash due to rotation

Duncan McNamara git at videolan.org
Wed Nov 28 18:25:35 CET 2018


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Nov 27 18:54:41 2018 +0100| [869426b958ab5fabd2ca8518f758220d309b8c8a] | committer: Geoffrey Métais

Benchmark: fix crash due to rotation

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/869426b958ab5fabd2ca8518f758220d309b8c8a
---

 vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java
index 7045cdaec..6b257d36d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.java
@@ -224,6 +224,8 @@ public class BenchActivity extends ShallowVideoPlayer {
 
         // blocking display in landscape orientation
         setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+        // Minimum apk for benchmark is 21, so this warning is a non-issue
+        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED);
 
         // Check for write permission, if false will ask
         // for them after asking for screenshot permission



More information about the Android mailing list