[Android] Runtime permission for drawing overlays
Geoffrey Métais
git at videolan.org
Fri Apr 1 12:04:04 CEST 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 31 13:08:12 2016 +0200| [8c808a757c97bdc456423841b91b033d2bd92c32] | committer: Geoffrey Métais
Runtime permission for drawing overlays
> https://code.videolan.org/videolan/vlc-android/commit/8c808a757c97bdc456423841b91b033d2bd92c32
---
vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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 7c56ba2..a6621df 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -56,6 +56,7 @@ import org.videolan.vlc.gui.video.VideoPlayerActivity;
import org.videolan.vlc.interfaces.IPlaybackSettingsController;
import org.videolan.vlc.media.MediaWrapper;
import org.videolan.vlc.util.AndroidDevices;
+import org.videolan.vlc.util.Permissions;
import org.videolan.vlc.util.Strings;
import org.videolan.vlc.view.AutoFitRecyclerView;
@@ -401,7 +402,10 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
((VideoPlayerActivity)getActivity()).switchToAudioMode(true);
break;
case ID_POPUP_VIDEO:
- ((VideoPlayerActivity)getActivity()).switchToPopupMode();
+ if (Permissions.canDrawOverlays(mActivity))
+ ((VideoPlayerActivity)getActivity()).switchToPopupMode();
+ else
+ Permissions.checkDrawOverlaysPermission(mActivity);
break;
case ID_EQUALIZER:
Intent i = new Intent(getActivity(), SecondaryActivity.class);
More information about the Android
mailing list