Skip to content

Commit

Permalink
Fixed javadoc issues due to java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwernick committed Aug 26, 2015
1 parent 185cae8 commit 99a33b8
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* A simple example of making a fullscreen video player activity.
* </p>
* <p>
* <b><em>NOTE:</em></b> the EMVideoView setup is done in the {@link VideoPlayerActivity}
*/
public class FullScreenVideoPlayerActivity extends VideoPlayerActivity {
Expand Down
4 changes: 4 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ android {
targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
abortOnError false
}

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public void updatePlayPauseImage(boolean isPlaying) {
* Sets the button state for the Previous button. This will just
* change the images specified with {@link #setPreviousImageResource(int)},
* or use the defaults if they haven't been set, and block any click events.
* </p>
* <p>
* This method will NOT re-add buttons that have previously been removed with
* {@link #setNextButtonRemoved(boolean)}.
*
Expand All @@ -299,7 +299,7 @@ public void setPreviousButtonEnabled(boolean enabled) {
* Sets the button state for the Next button. This will just
* change the images specified with {@link #setNextImageResource(int)},
* or use the defaults if they haven't been set, and block any click events.
* </p>
* <p>
* This method will NOT re-add buttons that have previously been removed with
* {@link #setPreviousButtonRemoved(boolean)}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* An AudioPlayer that uses the ExoPlayer as the backing architecture. If the current device
* does <em>NOT</em> pass the Android Compatibility Test Suite (CTS) then the backing architecture
* will fall back to using the default Android MediaPlayer.
* <p/>
* <p>
* To help with quick conversions from the Android MediaPlayer this class follows the APIs
* the MediaPlayer provides.
*/
Expand Down Expand Up @@ -476,7 +476,7 @@ public long getDuration() {
* only be used when the item doesn't return the correct duration such as with audio streams.
* This only overrides the current audio item.
*
* @param duration The duration for the current media item or < 0 to disable
* @param duration The duration for the current media item or &lt; 0 to disable
*/
public void overrideDuration(int duration) {
overriddenDuration = duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* JellyBean. On devices with JellyBean and up we will use the ExoPlayer in order to
* better support HLS streaming and full 1080p video resolutions which the VideoView
* struggles with, and in some cases crashes.
* <p/>
* <p>
* To an external user this view should have the same APIs used with the standard VideoView
* to help with quick implementations.
*/
Expand Down Expand Up @@ -497,10 +497,10 @@ public void showDefaultControls() {
* Sets the button state for the Previous button on the default controls; see
* {@link #setDefaultControlsEnabled(boolean)}.
* {@link #setDefaultControlsEnabled(boolean)} must be called prior to this.
* <p/>
* <p>
* This will just change the images specified with {@link #setPreviousImageResource(int)},
* or use the defaults if they haven't been set, and block any click events.
* </p>
* <p>
* This method will NOT re-add buttons that have previously been removed with
* {@link #setPreviousButtonRemoved(boolean)}.
*
Expand All @@ -516,10 +516,10 @@ public void setPreviousButtonEnabled(boolean enabled) {
* Sets the button state for the Next button on the default controls; see
* {@link #setDefaultControlsEnabled(boolean)}.
* {@link #setDefaultControlsEnabled(boolean)} must be called prior to this.
* <p/>
* <p>
* This will just change the images specified with {@link #setNextImageResource(int)},
* or use the defaults if they haven't been set, and block any click events.
* </p>
* <p>
* This method will NOT re-add buttons that have previously been removed with
* {@link #setNextButtonRemoved(boolean)}.
*
Expand Down Expand Up @@ -834,7 +834,7 @@ public long getDuration() {
* only be used when the item doesn't return the correct duration such as with audio streams.
* This only overrides the current audio item.
*
* @param duration The duration for the current media item or < 0 to disable
* @param duration The duration for the current media item or &lt; 0 to disable
*/
public void overrideDuration(int duration) {
overriddenDuration = duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/**
* A listener for internal errors.
* <p/>
* <p>
* These errors are not visible to the user, and hence this listener is provided for
* informational purposes only. Note however that an internal error may cause a fatal
* error if the player fails to recover. If this happens, {@link ExoPlayerListener#onError(Exception)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,25 @@ public enum MediaType {

public interface PlaylistItem {
long getId();

long getPlaylistId();

boolean isAudio();

boolean isVideo();

String getMediaUrl();

String getDownloadedMediaUri();

String getThumbnailUrl();

String getArtworkUrl();

String getTitle();

String getAlbum();

String getArtist();
}

Expand All @@ -86,6 +96,7 @@ public interface PlaylistItem {
private Intent seekEndedIntent, allowedTypeChangedIntent;

protected abstract Application getApplication();

protected abstract Class<? extends Service> getMediaServiceClass();

/**
Expand Down Expand Up @@ -224,9 +235,9 @@ public void unRegisterServiceCallbacks(EMPlaylistServiceCallback callback) {
* item as specified by the passed parameters.
*
* @param playListItems The list of items to play
* @param startIndex The index in the playlistItems to start playback
* @param seekPosition The position in the startIndex item to start at (in milliseconds)
* @param startPaused True if the media item should start paused instead of playing
* @param startIndex The index in the playlistItems to start playback
* @param seekPosition The position in the startIndex item to start at (in milliseconds)
* @param startPaused True if the media item should start paused instead of playing
*/
public void play(List<I> playListItems, int startIndex, int seekPosition, boolean startPaused) {
setParameters(playListItems, startIndex);
Expand Down Expand Up @@ -257,7 +268,7 @@ public void play(int seekPosition, boolean startPaused) {
* and video items.
*
* @param playListItems The List of items to play
* @param startIndex The index in the list to start playback with
* @param startIndex The index in the list to start playback with
*/
public void setParameters(List<I> playListItems, int startIndex) {
playList = playListItems;
Expand Down Expand Up @@ -576,7 +587,7 @@ public void invokeSeekEnded(int seekPosition) {
* Creates the Intents that will be used to interact with the playlist service
*
* @param mediaServiceClass The class to inform of any media playback controls
* @param application The application to use when constructing the intents used to inform the playlist service of invocations
* @param application The application to use when constructing the intents used to inform the playlist service of invocations
*/
protected void constructControlIntents(Class<? extends Service> mediaServiceClass, Application application) {
//Creates the pending intents
Expand Down Expand Up @@ -681,9 +692,9 @@ private boolean isAllowedType(I item) {
/**
* Creates a PendingIntent for the given action to the specified service
*
* @param application The application to use when creating the pending intent
* @param application The application to use when creating the pending intent
* @param serviceClass The service class to notify of intents
* @param action The action to use
* @param action The action to use
* @return The resulting PendingIntent
*/
private PendingIntent createPendingIntent(Application application, Class<? extends Service> serviceClass, String action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/**
* <b>NOTE:</b> This service will request a wifi wakelock if the item
* being played isn't downloaded (see {@link #isDownloaded(EMPlaylistManager.PlaylistItem)}).
* </p>
* <p>
* This requires the manifest permission &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
*/
@SuppressWarnings("unused")
Expand Down Expand Up @@ -103,10 +103,15 @@ public enum MediaState {
protected List<EMPlaylistServiceCallback> callbackList = new LinkedList<>();

protected abstract String getAppName();

protected abstract int getNotificationId();

protected abstract float getAudioDuckVolume();

protected abstract M getMediaPlaylistManager();

protected abstract PendingIntent getNotificationClickPendingIntent();

protected abstract Bitmap getDefaultLargeNotificationImage();

/**
Expand Down Expand Up @@ -185,17 +190,17 @@ protected void onMediaPlayerResetting() {
*
* @param playlistItem The playlist item that has been stopped
*/
protected void onMediaStopped(I playlistItem){
protected void onMediaStopped(I playlistItem) {
//Purposefully left blank
}

/**
* Called when a current audio item has ended playback. This is called when we
* are unable to play an audio item.
*
* @param playlistItem The PlaylistItem that has ended
* @param playlistItem The PlaylistItem that has ended
* @param currentPosition The position the playlist item ended at
* @param duration The duration of the PlaylistItem
* @param duration The duration of the PlaylistItem
*/
protected void onAudioPlaybackEnded(I playlistItem, long currentPosition, long duration) {
//Purposefully left blank
Expand All @@ -204,9 +209,9 @@ protected void onAudioPlaybackEnded(I playlistItem, long currentPosition, long d
/**
* Called when an audio item has started playback.
*
* @param playlistItem The PlaylistItem that has started playback
* @param playlistItem The PlaylistItem that has started playback
* @param currentPosition The position the playback has started at
* @param duration The duration of the PlaylistItem
* @param duration The duration of the PlaylistItem
*/
protected void onAudioPlaybackStarted(I playlistItem, long currentPosition, long duration) {
//Purposefully left blank
Expand Down Expand Up @@ -241,7 +246,7 @@ protected Bitmap getLargeNotificationImage() {
/**
* Retrieves the image that will be displayed in the notification as a secondary
* image. This can be used to specify playback type (e.g. Chromecast).
*
* <p>
* This will be called any time the notification is updated
*
* @return The image to display in the secondary position
Expand All @@ -265,7 +270,7 @@ protected Bitmap getDefaultLargeNotificationSecondaryImage() {
/**
* Called when the image in the notification needs to be updated.
*
* @param size The square size for the image to display
* @param size The square size for the image to display
* @param playlistItem The media item to get the image for
*/
protected void updateLargeNotificationImage(int size, I playlistItem) {
Expand Down Expand Up @@ -787,7 +792,7 @@ protected void onLockScreenArtworkUpdated() {
/**
* Starts the actual item playback, correctly determining if the
* item is a video or an audio item.
*
* <p>
* <em><b>NOTE:</b></em> In order to play videos you will need to specify the
* VideoView with {@link EMPlaylistManager#setVideoView(EMVideoView)}
*/
Expand Down Expand Up @@ -959,14 +964,14 @@ protected void seekToNextPlayableItem() {
}

//Only iterate through the list if we aren't connected to the internet
if(!isNetworkAvailable()) {
while(currentItem != null && !isDownloaded(currentItem)) {
if (!isNetworkAvailable()) {
while (currentItem != null && !isDownloaded(currentItem)) {
currentItem = getMediaPlaylistManager().next();
}
}

//If we are unable to get a next playable item, post a network error
if(currentItem == null) {
if (currentItem == null) {
onNoNonNetworkItemsAvailable();
}

Expand Down

0 comments on commit 99a33b8

Please sign in to comment.