mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Merge branch 'dev' into Cleanup
This commit is contained in:
		| @@ -275,6 +275,8 @@ public final class BackgroundPlayer extends Service { | ||||
|     protected class BasePlayerImpl extends BasePlayer { | ||||
|  | ||||
|         @NonNull final private AudioPlaybackResolver resolver; | ||||
|         private int cachedDuration; | ||||
|         private String cachedDurationString; | ||||
|  | ||||
|         BasePlayerImpl(Context context) { | ||||
|             super(context); | ||||
| @@ -349,10 +351,14 @@ public final class BackgroundPlayer extends Service { | ||||
|  | ||||
|             if (!shouldUpdateOnProgress) return; | ||||
|             resetNotification(); | ||||
|             if(Build.VERSION.SDK_INT >= 26 /*Oreo*/) updateNotificationThumbnail(); | ||||
|             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) updateNotificationThumbnail(); | ||||
|             if (bigNotRemoteView != null) { | ||||
|                 if(cachedDuration != duration) { | ||||
|                     cachedDuration = duration; | ||||
|                     cachedDurationString = getTimeString(duration); | ||||
|                 } | ||||
|                 bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, duration, currentProgress, false); | ||||
|                 bigNotRemoteView.setTextViewText(R.id.notificationTime, getTimeString(currentProgress) + " / " + getTimeString(duration)); | ||||
|                 bigNotRemoteView.setTextViewText(R.id.notificationTime, getTimeString(currentProgress) + " / " + cachedDurationString); | ||||
|             } | ||||
|             if (notRemoteView != null) { | ||||
|                 notRemoteView.setProgressBar(R.id.notificationProgressBar, duration, currentProgress, false); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tobias Groza
					Tobias Groza