From d3a6ffb05737e21ac3339bfb75e99eebc8310958 Mon Sep 17 00:00:00 2001 From: Oizaro <45825534+Oizaro@users.noreply.github.com> Date: Mon, 7 Sep 2020 16:22:24 +0200 Subject: [PATCH] Cleanup --- .../microg/gms/common/ForegroundServiceContext.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/play-services-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java b/play-services-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java index 63257576..aad02fb9 100644 --- a/play-services-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java +++ b/play-services-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java @@ -73,18 +73,12 @@ public class ForegroundServiceContext extends ContextWrapper { mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, mIntent, 0); - NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, "foreground-service") + return new NotificationCompat.Builder(context, "foreground-service") .setOngoing(true) .setContentIntent(pendingIntent) .setContentTitle(context.getResources().getString(R.string.notification_service_title)) .setContentText(context.getResources().getString(R.string.notification_service_content)) - .setSmallIcon(R.drawable.ic_foreground_notification); - - NotificationManager notificationManager = - (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE); - - notificationManager.notify(0, notificationBuilder.build()); - - return null; + .setSmallIcon(R.drawable.ic_foreground_notification) + .build(); } }