mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-09-12 17:26:53 +02:00
Fix
This commit is contained in:
parent
8703fb3138
commit
daa23d87bf
@ -70,7 +70,7 @@ public class ForegroundServiceContext extends ContextWrapper {
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private static Notification buildForegroundNotification(Context context) {
|
||||
NotificationChannel channel = new NotificationChannel("foreground-service", Resources.getSystem().getString(R.string.notification_service_name), NotificationManager.IMPORTANCE_MIN);
|
||||
NotificationChannel channel = new NotificationChannel("foreground-service", context.getResources().getString(R.string.notification_service_name), NotificationManager.IMPORTANCE_MIN);
|
||||
channel.setShowBadge(false);
|
||||
channel.setLockscreenVisibility(0);
|
||||
channel.setVibrationPattern(new long[0]);
|
||||
@ -82,8 +82,8 @@ public class ForegroundServiceContext extends ContextWrapper {
|
||||
return new Notification.Builder(context, channel.getId())
|
||||
.setOngoing(true)
|
||||
.setContentIntent(pendingIntent)
|
||||
.setContentTitle(Resources.getSystem().getString(R.string.notification_service_title))
|
||||
.setContentText(Resources.getSystem().getString(R.string.notification_service_content))
|
||||
.setContentTitle(context.getResources().getString(R.string.notification_service_title))
|
||||
.setContentText(context.getResources().getString(R.string.notification_service_content))
|
||||
.setSmallIcon(R.drawable.ic_foreground_notification)
|
||||
.build();
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ import android.util.Log;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.legacy.content.WakefulBroadcastReceiver;
|
||||
|
||||
import com.mgoogle.android.gms.R;
|
||||
import com.squareup.wire.Message;
|
||||
|
||||
import org.microg.gms.checkin.LastCheckinInfo;
|
||||
@ -320,13 +321,13 @@ public class McsService extends Service implements Handler.Callback {
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private Notification buildForegroundNotification() {
|
||||
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_LOW);
|
||||
NotificationChannel channel = new NotificationChannel("foreground-service", getString(R.string.notification_service_name), 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")
|
||||
.setContentTitle(this.getResources().getString(R.string.notification_service_title))
|
||||
.setSmallIcon(android.R.drawable.stat_notify_sync)
|
||||
.build();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user