mirror of https://github.com/YTVanced/VancedMicroG
Cleanup
This commit is contained in:
parent
a0ffb9846b
commit
d3a6ffb057
|
@ -73,18 +73,12 @@ public class ForegroundServiceContext extends ContextWrapper {
|
||||||
mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, mIntent, 0);
|
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)
|
.setOngoing(true)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
.setContentTitle(context.getResources().getString(R.string.notification_service_title))
|
.setContentTitle(context.getResources().getString(R.string.notification_service_title))
|
||||||
.setContentText(context.getResources().getString(R.string.notification_service_content))
|
.setContentText(context.getResources().getString(R.string.notification_service_content))
|
||||||
.setSmallIcon(R.drawable.ic_foreground_notification);
|
.setSmallIcon(R.drawable.ic_foreground_notification)
|
||||||
|
.build();
|
||||||
NotificationManager notificationManager =
|
|
||||||
(NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
|
||||||
|
|
||||||
notificationManager.notify(0, notificationBuilder.build());
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue