mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Clear service variable when onCreate() fails to start foreground service
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
This commit is contained in:
@@ -92,6 +92,9 @@ public final class FetchForegroundService extends Service {
|
||||
startForeground(NotificationCenter.ID_FETCH, notification);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Failed to start foreground service", e);
|
||||
synchronized (SERVICE_LOCK) {
|
||||
service = null;
|
||||
}
|
||||
stopSelf();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user