Fix crash with delayed foreground service.

fork-5.53.8
Greyson Parrelli 2022-09-28 15:16:52 -04:00
rodzic b6d7271858
commit aaf8bf3280
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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 () -> {};
}