mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-14 21:27:31 +01:00
parent
847e823d64
commit
3db548187d
@ -50,7 +50,7 @@ public class ForegroundServiceContext extends ContextWrapper {
|
|||||||
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
|
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_NONE);
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||||
channel.setShowBadge(false);
|
channel.setShowBadge(false);
|
||||||
channel.setVibrationPattern(new long[0]);
|
channel.setVibrationPattern(new long[] {0});
|
||||||
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
context.getSystemService(NotificationManager.class).createNotificationChannel(channel);
|
||||||
return new Notification.Builder(context, channel.getId())
|
return new Notification.Builder(context, channel.getId())
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
@ -329,19 +329,6 @@ public class McsService extends Service implements Handler.Callback {
|
|||||||
return START_REDELIVER_INTENT;
|
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) {
|
private void handleSendMessage(Intent intent) {
|
||||||
String messageId = intent.getStringExtra(EXTRA_MESSAGE_ID);
|
String messageId = intent.getStringExtra(EXTRA_MESSAGE_ID);
|
||||||
String collapseKey = intent.getStringExtra(EXTRA_COLLAPSE_KEY);
|
String collapseKey = intent.getStringExtra(EXTRA_COLLAPSE_KEY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user