mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-12-03 16:27:26 +00:00
parent
847e823d64
commit
3db548187d
2 changed files with 1 additions and 14 deletions
|
@ -50,7 +50,7 @@ public class ForegroundServiceContext extends ContextWrapper {
|
|||
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
|
||||
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||
channel.setShowBadge(false);
|
||||
channel.setVibrationPattern(new long[0]);
|
||||
channel.setVibrationPattern(new long[] {0});
|
||||
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
||||
return new Notification.Builder(context, channel.getId())
|
||||
.setOngoing(true)
|
||||
|
|
|
@ -329,19 +329,6 @@ public class McsService extends Service implements Handler.Callback {
|
|||
return START_REDELIVER_INTENT;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private Notification buildForegroundNotification() {
|
||||
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_LOW);
|
||||
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||
channel.setShowBadge(false);
|
||||
getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
||||
return new Notification.Builder(this, channel.getId())
|
||||
.setOngoing(true)
|
||||
.setContentTitle("Running in background")
|
||||
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
||||
.build();
|
||||
}
|
||||
|
||||
private void handleSendMessage(Intent intent) {
|
||||
String messageId = intent.getStringExtra(EXTRA_MESSAGE_ID);
|
||||
String collapseKey = intent.getStringExtra(EXTRA_COLLAPSE_KEY);
|
||||
|
|
Loading…
Reference in a new issue