[Android] PlaybackServiceFragment: getHelper can fail

Thomas Guillem git at videolan.org
Wed Jul 1 19:19:18 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  1 18:36:54 2015 +0200| [ca52cc0a07f147f9d63928afabd41daf05957fc0] | committer: Thomas Guillem

PlaybackServiceFragment: getHelper can fail

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ca52cc0a07f147f9d63928afabd41daf05957fc0
---

 vlc-android/src/org/videolan/vlc/gui/PlaybackServiceFragment.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceFragment.java b/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceFragment.java
index d0beff3..20215e2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceFragment.java
@@ -42,7 +42,7 @@ public abstract class PlaybackServiceFragment extends Fragment implements Playba
         else if ((activity instanceof VideoPlayerActivity))
             return ((VideoPlayerActivity) activity).getHelper();
         else
-            throw new IllegalArgumentException("Fragment must be inside AudioPlayerContainerActivity or PlaybackServiceActivity");
+            return null;
     }
 
     private static void registerPlaybackService(Activity activity, PlaybackService.Client.Callback cb) {



More information about the Android mailing list