[Android] Use hasPiP constant
Geoffrey Métais
git at videolan.org
Tue Jun 13 15:01:01 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun 13 14:23:51 2017 +0200| [371a4ded44ca286f40ca4a1cfdee8c00f87d8808] | committer: Geoffrey Métais
Use hasPiP constant
> https://code.videolan.org/videolan/vlc-android/commit/371a4ded44ca286f40ca4a1cfdee8c00f87d8808
---
vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
index 3fba9251b..fd7b0b9fa 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -49,7 +49,6 @@ import android.widget.TextView;
import android.widget.Toast;
import org.videolan.libvlc.MediaPlayer;
-import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.vlc.PlaybackService;
import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
@@ -471,7 +470,8 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
((VideoPlayerActivity)getActivity()).switchToAudioMode(true);
break;
case ID_POPUP_VIDEO:
- if (AndroidUtil.isOOrLater || VLCApplication.showTvUi()) {
+ if (AndroidDevices.hasPiP) {
+ //noinspection deprecation
getActivity().enterPictureInPictureMode();
} else {
if (Permissions.canDrawOverlays(mActivity))
@@ -551,7 +551,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
mAdapter.addOption(new Option(ID_PLAY_AS_AUDIO, R.attr.ic_playasaudio_on, getString(R.string.play_as_audio)));
mAdapter.addOption(new Option(ID_SPU_DELAY, R.attr.ic_subtitledelay, getString(R.string.spu_delay)));
mAdapter.addOption(new Option(ID_AUDIO_DELAY, R.attr.ic_audiodelay, getString(R.string.audio_delay)));
- if (!tvUi || AndroidDevices.isAndroidTv() && AndroidUtil.isNougatOrLater)
+ if (!tvUi || AndroidDevices.hasPiP)
mAdapter.addOption(new Option(ID_POPUP_VIDEO, R.attr.ic_popup_dim, getString(R.string.popup_playback_title)));
mAdapter.addOption(new Option(ID_REPEAT, R.attr.ic_repeat, getString(R.string.repeat_title)));
if (mService.canShuffle())
More information about the Android
mailing list