diff options
Diffstat (limited to 'android/src/org/rockbox/RockboxService.java')
-rw-r--r-- | android/src/org/rockbox/RockboxService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/src/org/rockbox/RockboxService.java b/android/src/org/rockbox/RockboxService.java index 3182b73b1c..49abb52dd5 100644 --- a/android/src/org/rockbox/RockboxService.java +++ b/android/src/org/rockbox/RockboxService.java @@ -167,8 +167,12 @@ public class RockboxService extends Service public int onStartCommand(Intent intent, int flags, int startId) { + /* if null, then the service was most likely restarted by android + * after getting killed for memory pressure earlier */ + if (intent == null) + intent = new Intent("org.rockbox.ServiceRestarted"); do_start(intent); - return 1; /* old API compatibility: 1 == START_STICKY */ + return START_STICKY; } private void startservice() |