diff options
author | orionlee <orionlee@yahoo.com> | 2019-09-22 11:03:09 -0700 |
---|---|---|
committer | orionlee <orionlee@yahoo.com> | 2019-09-22 11:03:09 -0700 |
commit | 427477b2562bd2ea8a4a3d6a01b923303c496e53 (patch) | |
tree | ae368136db86b8adbe81279bba72b782b29d7dbe /app/src/main/java/de/danoeh/antennapod/activity | |
parent | e18d8f351476ede5047a08ec1f0dd3a9b45a8b99 (diff) | |
download | AntennaPod-427477b2562bd2ea8a4a3d6a01b923303c496e53.zip |
#2929 - minor coding style tweaks per review
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/activity')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index c0af36d84..1b6fa6bce 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -394,7 +394,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements final FeedItem feedItem = getFeedItem(media); // some options option requires FeedItem switch (item.getItemId()) { case R.id.add_to_favorites_item: - if(feedItem != null) { + if (feedItem != null) { DBWriter.addFavoriteItem(feedItem); isFavorite = true; invalidateOptionsMenu(); @@ -403,7 +403,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements } break; case R.id.remove_from_favorites_item: - if(feedItem != null) { + if (feedItem != null) { DBWriter.removeFavoriteItem(feedItem); isFavorite = false; invalidateOptionsMenu(); @@ -874,7 +874,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements @Nullable private static FeedItem getFeedItem(@Nullable Playable playable) { - if (playable instanceof FeedMedia) { + if ((playable != null) && (playable instanceof FeedMedia)) { return ((FeedMedia)playable).getItem(); } else { return null; |