[Android] Pass benchmark parameter to display manager
Geoffrey Métais
git at videolan.org
Tue May 29 14:28:29 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 29 14:28:00 2018 +0200| [4f39c5294e6b99a5f74324b5aceaa9297e1ea3d1] | committer: Geoffrey Métais
Pass benchmark parameter to display manager
> https://code.videolan.org/videolan/vlc-android/commit/4f39c5294e6b99a5f74324b5aceaa9297e1ea3d1
---
vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt | 6 +++---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt b/vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
index 06995359e..7f2d14038 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
@@ -23,7 +23,7 @@ import org.videolan.vlc.RendererDelegate
import org.videolan.vlc.util.AndroidDevices
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
-class DisplayManager(private val activity: Activity, cloneMode: Boolean) {
+class DisplayManager(private val activity: Activity, cloneMode: Boolean, benchmark: Boolean) {
enum class DisplayType { PRIMARY, PRESENTATION, RENDERER }
@@ -57,8 +57,8 @@ class DisplayManager(private val activity: Activity, cloneMode: Boolean) {
}}
init {
- presentation = if (AndroidUtil.isJellyBeanMR1OrLater && !cloneMode) createPresentation() else null
- displayType = if (cloneMode) DisplayType.PRIMARY else getCurrentType()
+ presentation = if (AndroidUtil.isJellyBeanMR1OrLater && !(cloneMode || benchmark)) createPresentation() else null
+ displayType = if (benchmark) DisplayType.PRIMARY else getCurrentType()
if (!AndroidDevices.isChromeBook) RendererDelegate.selectedRenderer.observeForever(rendererObs)
}
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 8e7c5df39..276ff4ad9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -324,7 +324,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
audioBoostEnabled = mSettings.getBoolean("audio_boost", false);
mEnableCloneMode = mSettings.getBoolean("enable_clone_mode", false);
- mDisplayManager = new DisplayManager(this, mEnableCloneMode || mIsBenchmark);
+ mDisplayManager = new DisplayManager(this, mEnableCloneMode, mIsBenchmark);
setContentView(mDisplayManager.isPrimary() ? R.layout.player : R.layout.player_remote_control);
/** initialize Views an their Events */
More information about the Android
mailing list