private Track[] getTracks() { synchronized (this) { if (mNativeTracks != null) return mNativeTracks; if (isReleased()) return null; } final Track[] tracks = nativeGetTracks(); synchronized (this) { mNativeTracks = tracks; return mNativeTracks; } }
private Track[] getTracks() { synchronized (this) { if (mNativeTracks != null) return mNativeTracks; if (isReleased()) return null; } final Track[] tracks = nativeGetTracks(); synchronized (this) { mNativeTracks = tracks; return mNativeTracks; } }
private Track[] getTracks() { synchronized (this) { if (mNativeTracks != null) return mNativeTracks; if (isReleased()) return null; } final Track[] tracks = nativeGetTracks(); synchronized (this) { mNativeTracks = tracks; return mNativeTracks; } }
private Track[] getTracks() { synchronized (this) { if (mNativeTracks != null) return mNativeTracks; if (isReleased()) return null; } final Track[] tracks = nativeGetTracks(); synchronized (this) { mNativeTracks = tracks; return mNativeTracks; } }
private Track[] getTracks() { synchronized (this) { if (mNativeTracks != null) return mNativeTracks; if (isReleased()) return null; } final Track[] tracks = nativeGetTracks(); synchronized (this) { mNativeTracks = tracks; return mNativeTracks; } }
/** * Get the duration of the media. */ public long getDuration() { synchronized (this) { if (mDuration != -1) return mDuration; if (isReleased()) return 0; } final long duration = nativeGetDuration(); synchronized (this) { mDuration = duration; return mDuration; } }
/** * Get the duration of the media. */ public long getDuration() { synchronized (this) { if (mDuration != -1) return mDuration; if (isReleased()) return 0; } final long duration = nativeGetDuration(); synchronized (this) { mDuration = duration; return mDuration; } }
/** * Get the duration of the media. */ public long getDuration() { synchronized (this) { if (mDuration != -1) return mDuration; if (isReleased()) return 0; } final long duration = nativeGetDuration(); synchronized (this) { mDuration = duration; return mDuration; } }
/** * Get the duration of the media. */ public long getDuration() { synchronized (this) { if (mDuration != -1) return mDuration; if (isReleased()) return 0; } final long duration = nativeGetDuration(); synchronized (this) { mDuration = duration; return mDuration; } }
/** * Get the duration of the media. */ public long getDuration() { synchronized (this) { if (mDuration != -1) return mDuration; if (isReleased()) return 0; } final long duration = nativeGetDuration(); synchronized (this) { mDuration = duration; return mDuration; } }
/** * Get the type of the media * * @see {@link Type} */ public int getType() { synchronized (this) { if (mType != -1) return mType; if (isReleased()) return Type.Unknown; } final int type = nativeGetType(); synchronized (this) { mType = type; return mType; } }
/** * Get the state of the media. * * @see State */ public int getState() { synchronized (this) { if (mState != -1) return mState; if (isReleased()) return State.Error; } final int state = nativeGetState(); synchronized (this) { mState = state; return mState; } }
/** * Get the state of the media. * * @see State */ public int getState() { synchronized (this) { if (mState != -1) return mState; if (isReleased()) return State.Error; } final int state = nativeGetState(); synchronized (this) { mState = state; return mState; } }
/** * Get the type of the media * * @return type */ public int getType() { synchronized (this) { if (mType != -1) return mType; if (isReleased()) return Type.Unknown; } final int type = nativeGetType(); synchronized (this) { mType = type; return mType; } }
/** * Get the type of the media * * @see {@link Type} */ public int getType() { synchronized (this) { if (mType != -1) return mType; if (isReleased()) return Type.Unknown; } final int type = nativeGetType(); synchronized (this) { mType = type; return mType; } }
/** * 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); }
/** * 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) { 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()); }