mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-04 16:28:41 +00:00
Fix crash with delayed foreground service.
This commit is contained in:
@@ -91,7 +91,7 @@ public class BackgroundMessageRetriever {
|
||||
|
||||
private NoExceptionCloseable startDelayedForegroundServiceIfPossible(@NonNull Context context, long showNotificationAfterMs) {
|
||||
if (Build.VERSION.SDK_INT < 31) {
|
||||
return (NoExceptionCloseable) GenericForegroundService.startForegroundTaskDelayed(context, context.getString(R.string.BackgroundMessageRetriever_checking_for_messages), showNotificationAfterMs, R.drawable.ic_signal_refresh);
|
||||
return GenericForegroundService.startForegroundTaskDelayed(context, context.getString(R.string.BackgroundMessageRetriever_checking_for_messages), showNotificationAfterMs, R.drawable.ic_signal_refresh)::close;
|
||||
} else {
|
||||
return () -> {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user