From eb5fb42da9776149db8c882cf16a4da4f8531c9f Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 3 Jan 2020 16:29:04 +0300 Subject: [PATCH] Couple more code review changes --- .../org/schabi/newpipe/player/BackgroundPlayer.java | 10 +++++++--- .../newpipe/player/helper/MediaSessionManager.java | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 9e896b14f..76da7da36 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -403,9 +403,13 @@ public final class BackgroundPlayer extends Service { updateProgress(currentProgress, duration, bufferPercent); if (!shouldUpdateOnProgress) return; - if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) {resetNotification(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) - updateNotificationThumbnail();} + if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) { + resetNotification(); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) { + updateNotificationThumbnail(); + } + } if (bigNotRemoteView != null) { if (cachedDuration != duration) { cachedDuration = duration; diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java index 9134d6144..8b9369613 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java @@ -82,7 +82,7 @@ public class MediaSessionManager { } /** - * Should be called on player destruction to prevent leakage.BitmapUtils + * Should be called on player destruction to prevent leakage. */ public void dispose() { this.sessionConnector.setPlayer(null);