mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-09-04 03:47:55 +00:00
Update manifest, startForeground call
This commit is contained in:
@@ -96,8 +96,14 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/title_activity_about" />
|
android:label="@string/title_activity_about" />
|
||||||
|
|
||||||
<service android:name=".local.subscription.services.SubscriptionsImportService" />
|
<service
|
||||||
<service android:name=".local.subscription.services.SubscriptionsExportService" />
|
android:name=".local.subscription.services.SubscriptionsImportService"
|
||||||
|
android:foregroundServiceType="dataSync" />
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".local.subscription.services.SubscriptionsExportService"
|
||||||
|
android:foregroundServiceType="dataSync" />
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".local.feed.service.FeedLoadService"
|
android:name=".local.feed.service.FeedLoadService"
|
||||||
android:foregroundServiceType="dataSync" />
|
android:foregroundServiceType="dataSync" />
|
||||||
@@ -431,6 +437,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<service
|
<service
|
||||||
android:name=".RouterActivity$FetcherService"
|
android:name=".RouterActivity$FetcherService"
|
||||||
|
android:foregroundServiceType="dataSync"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
<!-- opting out of sending metrics to Google in Android System WebView -->
|
<!-- opting out of sending metrics to Google in Android System WebView -->
|
||||||
|
@@ -174,12 +174,8 @@ public final class NotificationUtil {
|
|||||||
}
|
}
|
||||||
updateNotification();
|
updateNotification();
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
ServiceCompat.startForeground(player.getService(), NOTIFICATION_ID,
|
||||||
player.getService().startForeground(NOTIFICATION_ID, notificationBuilder.build(),
|
notificationBuilder.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK);
|
||||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK);
|
|
||||||
} else {
|
|
||||||
player.getService().startForeground(NOTIFICATION_ID, notificationBuilder.build());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelNotificationAndStopForeground() {
|
public void cancelNotificationAndStopForeground() {
|
||||||
|
Reference in New Issue
Block a user