File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
java/org/schabi/newpipe/player/notification Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 9696 android : exported =" false"
9797 android : label =" @string/title_activity_about" />
9898
99- <service android : name =" .local.subscription.services.SubscriptionsImportService" />
100- <service android : name =" .local.subscription.services.SubscriptionsExportService" />
99+ <service
100+ android : name =" .local.subscription.services.SubscriptionsImportService"
101+ android : foregroundServiceType =" dataSync" />
102+
103+ <service
104+ android : name =" .local.subscription.services.SubscriptionsExportService"
105+ android : foregroundServiceType =" dataSync" />
106+
101107 <service
102108 android : name =" .local.feed.service.FeedLoadService"
103109 android : foregroundServiceType =" dataSync" />
431437 </activity >
432438 <service
433439 android : name =" .RouterActivity$FetcherService"
440+ android : foregroundServiceType =" dataSync"
434441 android : exported =" false" />
435442
436443 <!-- opting out of sending metrics to Google in Android System WebView -->
Original file line number Diff line number Diff line change @@ -174,12 +174,8 @@ public void createNotificationAndStartForeground() {
174174 }
175175 updateNotification ();
176176
177- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .Q ) {
178- player .getService ().startForeground (NOTIFICATION_ID , notificationBuilder .build (),
179- ServiceInfo .FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK );
180- } else {
181- player .getService ().startForeground (NOTIFICATION_ID , notificationBuilder .build ());
182- }
177+ ServiceCompat .startForeground (player .getService (), NOTIFICATION_ID ,
178+ notificationBuilder .build (), ServiceInfo .FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK );
183179 }
184180
185181 public void cancelNotificationAndStopForeground () {
You can’t perform that action at this time.
0 commit comments