From defabdc20ca7b1b09bada93b4b8545425a68cc61 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 28 Sep 2011 19:36:54 -0500 Subject: [PATCH] Additional service fixes from the original author of the issue 2777 fix to stop the service from being shutdown when we have push enabled --- src/com/fsck/k9/service/PollService.java | 6 ++++++ src/com/fsck/k9/service/PushService.java | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/com/fsck/k9/service/PollService.java b/src/com/fsck/k9/service/PollService.java index b8d1b60e4..e7e471c30 100644 --- a/src/com/fsck/k9/service/PollService.java +++ b/src/com/fsck/k9/service/PollService.java @@ -35,6 +35,12 @@ public class PollService extends CoreService { context.startService(i); } + @Override + public void onCreate() { + super.onCreate(); + setAutoShutdown(false); + } + @Override public void startService(Intent intent, int startId) { if (START_SERVICE.equals(intent.getAction())) { diff --git a/src/com/fsck/k9/service/PushService.java b/src/com/fsck/k9/service/PushService.java index e773b042b..6be36629a 100644 --- a/src/com/fsck/k9/service/PushService.java +++ b/src/com/fsck/k9/service/PushService.java @@ -39,6 +39,13 @@ public class PushService extends CoreService { } + @Override + public void onCreate() { + super.onCreate(); + setAutoShutdown(false); + } + + @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub