diff options
-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 | |||
167 | 167 | ||
168 | public int onStartCommand(Intent intent, int flags, int startId) | 168 | public int onStartCommand(Intent intent, int flags, int startId) |
169 | { | 169 | { |
170 | /* if null, then the service was most likely restarted by android | ||
171 | * after getting killed for memory pressure earlier */ | ||
172 | if (intent == null) | ||
173 | intent = new Intent("org.rockbox.ServiceRestarted"); | ||
170 | do_start(intent); | 174 | do_start(intent); |
171 | return 1; /* old API compatibility: 1 == START_STICKY */ | 175 | return START_STICKY; |
172 | } | 176 | } |
173 | 177 | ||
174 | private void startservice() | 178 | private void startservice() |