/** * Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}. */ public synchronized Media getMedia() { if (mMedia != null) mMedia.retain(); return mMedia; }
/** * Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}. */ public synchronized Media getMedia() { if (mMedia != null) mMedia.retain(); return mMedia; }
/** * Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}. */ public synchronized Media getMedia() { if (mMedia != null) mMedia.retain(); return mMedia; }
/** * Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}. */ public synchronized Media getMedia() { if (mMedia != null) mMedia.retain(); return mMedia; }
/** * Get the Media used by this MediaPlayer. This Media should be released with {@link #release()}. */ public synchronized Media getMedia() { if (mMedia != null) mMedia.retain(); return mMedia; }
protected Event(int type, Media media, boolean retain, int index) { super(type); if (retain && (media == null || !media.retain())) throw new IllegalStateException("invalid media reference"); this.media = media; this.retain = retain; this.index = index; }
/** * Get a Media at specified index. * * @param index index of the media * @return Media hold by MediaList. This Media should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getCount()) throw new IndexOutOfBoundsException(); final Media media = mMediaArray.get(index); media.retain(); return media; }
/** * Get a Media at specified index. * * @param index index of the media * @return Media hold by MediaList. This Media should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getCount()) throw new IndexOutOfBoundsException(); final Media media = mMediaArray.get(index); media.retain(); return media; }
/** * Get a Media at specified index. * * @param index index of the media * @return Media hold by MediaList. This Media should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getCount()) throw new IndexOutOfBoundsException(); final Media media = mMediaArray.get(index); media.retain(); return media; }
/** * Get a Media at specified index. * * @param index index of the media * @return Media hold by MediaList. This Media should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getCount()) throw new IndexOutOfBoundsException(); final Media media = mMediaArray.get(index); media.retain(); return media; }
/** * Get a Media at specified index. * * @param index index of the media * @return Media hold by MediaList. This Media should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getCount()) throw new IndexOutOfBoundsException(); final Media media = mMediaArray.get(index); media.retain(); return media; }
/** * Create a MediaPlayer from a Media * * @param media a valid Media object */ public MediaPlayer(Media media) { super(media); if (media == null || media.isReleased()) throw new IllegalArgumentException("Media is null or released"); mMedia = media; mMedia.retain(); nativeNewFromMedia(mMedia, mWindow); }
/** * Create a MediaPlayer from a Media * * @param media a valid Media object */ public MediaPlayer(Media media) { super(media); if (media == null || media.isReleased()) throw new IllegalArgumentException("Media is null or released"); mMedia = media; mMedia.retain(); nativeNewFromMedia(mMedia, mWindow); }
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
/** * Create a MediaPlayer from a Media * * @param media a valid Media object */ public MediaPlayer(Media media) { if (media == null || media.isReleased()) throw new IllegalArgumentException("Media is null or released"); mMedia = media; mMedia.retain(); nativeNewFromMedia(mMedia, mWindow.getNativeHandler()); }
/** * Create a MediaPlayer from a Media * * @param media a valid Media object */ public MediaPlayer(Media media) { if (media == null || media.isReleased()) throw new IllegalArgumentException("Media is null or released"); mMedia = media; mMedia.retain(); nativeNewFromMedia(mMedia, mWindow.getNativeHandler()); }