From b809fc007b8442919e14ce9df8597d27769a92ce Mon Sep 17 00:00:00 2001 From: adbenitez Date: Wed, 12 Nov 2025 16:46:21 +0100 Subject: [PATCH] implement Service.onTimeout() in FetchForegroundService --- .../securesms/service/FetchForegroundService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/thoughtcrime/securesms/service/FetchForegroundService.java b/src/main/java/org/thoughtcrime/securesms/service/FetchForegroundService.java index 341559663..bf8b6218c 100644 --- a/src/main/java/org/thoughtcrime/securesms/service/FetchForegroundService.java +++ b/src/main/java/org/thoughtcrime/securesms/service/FetchForegroundService.java @@ -108,4 +108,15 @@ public final class FetchForegroundService extends Service { public IBinder onBind(Intent intent) { return null; } + + @Override + public void onTimeout(int startId, int fgsType) { + if (fetchingSynchronously) { + fetchingSynchronously = false; + synchronized (STOP_NOTIFIER) { + STOP_NOTIFIER.notifyAll(); + } + } + } + }