[Android] Video: disable volume/brightness when irrelevant
Geoffrey Métais
git at videolan.org
Tue Jun 18 14:52:30 CEST 2019
vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun 18 14:51:17 2019 +0200| [3dd153090b7c0046256f3b1e1c09cb2c6ee9a8c8] | committer: Geoffrey Métais
Video: disable volume/brightness when irrelevant
> https://code.videolan.org/videolan/vlc-android/commit/3dd153090b7c0046256f3b1e1c09cb2c6ee9a8c8
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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 5365ff162..3fafca2d7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -385,8 +385,11 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
mMedialibrary = VLCApplication.getMLInstance();
final int touch;
if (!mIsTv) {
- touch = (mSettings.getBoolean("enable_volume_gesture", true) ? VideoTouchDelegateKt.TOUCH_FLAG_AUDIO_VOLUME : 0)
- + (mSettings.getBoolean("enable_brightness_gesture", true) ? VideoTouchDelegateKt.TOUCH_FLAG_BRIGHTNESS : 0)
+ final boolean audioTouch = (!AndroidUtil.isLolliPopOrLater || !mAudioManager.isVolumeFixed())
+ && mSettings.getBoolean("enable_volume_gesture", true);
+ final boolean videoTouch = !AndroidDevices.isChromeBook && mSettings.getBoolean("enable_brightness_gesture", true);
+ touch = (audioTouch ? VideoTouchDelegateKt.TOUCH_FLAG_AUDIO_VOLUME : 0)
+ + (videoTouch ? VideoTouchDelegateKt.TOUCH_FLAG_BRIGHTNESS : 0)
+ (mSettings.getBoolean("enable_double_tap_seek", true) ? VideoTouchDelegateKt.TOUCH_FLAG_SEEK : 0);
} else touch = 0;
mCurrentScreenOrientation = getResources().getConfiguration().orientation;
More information about the Android
mailing list