[Android] Prevent PiP when picking subs
Geoffrey Métais
git at videolan.org
Tue Jun 27 10:19:38 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun 27 10:03:35 2017 +0200| [6da9696af2e41b7102548eb401070fcd30ace913] | committer: Geoffrey Métais
Prevent PiP when picking subs
Close #306
> https://code.videolan.org/videolan/vlc-android/commit/6da9696af2e41b7102548eb401070fcd30ace913
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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 99e807ec0..83133085c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -235,6 +235,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private boolean mDragging;
private boolean mShowing;
+ private boolean mShowingDialog;
private DelayState mPlaybackSetting = DelayState.OFF;
private SeekBar mSeekbar;
private TextView mTitle;
@@ -502,6 +503,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
@Override
protected void onResume() {
super.onResume();
+ mShowingDialog = false;
/*
* Set listeners here to avoid NPE when activity is closing
*/
@@ -592,7 +594,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
(AndroidUtil.isNougatOrLater && !AndroidUtil.isOOrLater //Video on background on Nougat Android TVs
&& AndroidDevices.isAndroidTv() && !requestVisibleBehind(true)))
stopPlayback();
- else if ("2".equals(mSettings.getString(PreferencesActivity.KEY_VIDEO_APP_SWITCH, "0")) && isInteractive()) {
+ else if (!mShowingDialog && "2".equals(mSettings.getString(PreferencesActivity.KEY_VIDEO_APP_SWITCH, "0")) && isInteractive()) {
switchToPopup();
}
}
@@ -2370,6 +2372,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
} else if (item.getItemId() == R.id.video_menu_subtitles_picker) {
if (mUri == null)
return false;
+ mShowingDialog = true;
Intent filePickerIntent = new Intent(context, FilePickerActivity.class);
filePickerIntent.setData(Uri.parse(FileUtils.getParent(mUri.toString())));
context.startActivityForResult(filePickerIntent, 0);
More information about the Android
mailing list