Refactor FeedLoadService to use it within the notification worker
This commit is contained in:
parent
c95aec9da6
commit
a5b9fe4c35
29 changed files with 576 additions and 631 deletions
|
|
@ -1,7 +1,5 @@
|
|||
package org.schabi.newpipe;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
|
@ -250,18 +248,15 @@ public class App extends MultiDexApplication {
|
|||
.setDescription(getString(R.string.hash_channel_description))
|
||||
.build();
|
||||
|
||||
final NotificationChannel newStreamsChannel = new NotificationChannel(
|
||||
getString(R.string.streams_notification_channel_id),
|
||||
getString(R.string.streams_notification_channel_name),
|
||||
NotificationManager.IMPORTANCE_DEFAULT
|
||||
);
|
||||
newStreamsChannel.setDescription(
|
||||
getString(R.string.streams_notification_channel_description)
|
||||
);
|
||||
newStreamsChannel.enableVibration(false);
|
||||
final NotificationChannelCompat newStreamsChannel = new NotificationChannelCompat
|
||||
.Builder(getString(R.string.streams_notification_channel_id),
|
||||
NotificationManagerCompat.IMPORTANCE_DEFAULT)
|
||||
.setName(getString(R.string.streams_notification_channel_name))
|
||||
.setDescription(getString(R.string.streams_notification_channel_description))
|
||||
.build();
|
||||
|
||||
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
notificationManager.createNotificationChannels(
|
||||
notificationManager.createNotificationChannelsCompat(
|
||||
Arrays.asList(mainChannel, appUpdateChannel, hashChannel, newStreamsChannel)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue