diff options
Diffstat (limited to 'android/src')
-rw-r--r-- | android/src/org/rockbox/RockboxService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/src/org/rockbox/RockboxService.java b/android/src/org/rockbox/RockboxService.java index a441a7dec4..4d61dea7ff 100644 --- a/android/src/org/rockbox/RockboxService.java +++ b/android/src/org/rockbox/RockboxService.java | |||
@@ -61,6 +61,7 @@ public class RockboxService extends Service | |||
61 | /* locals needed for the c code and rockbox state */ | 61 | /* locals needed for the c code and rockbox state */ |
62 | private RockboxFramebuffer fb = null; | 62 | private RockboxFramebuffer fb = null; |
63 | private boolean mRockboxRunning = false; | 63 | private boolean mRockboxRunning = false; |
64 | private volatile boolean rbLibLoaded; | ||
64 | private Activity current_activity = null; | 65 | private Activity current_activity = null; |
65 | private IntentFilter itf; | 66 | private IntentFilter itf; |
66 | private BroadcastReceiver batt_monitor; | 67 | private BroadcastReceiver batt_monitor; |
@@ -112,7 +113,8 @@ public class RockboxService extends Service | |||
112 | 113 | ||
113 | if (intent.hasExtra("callback")) | 114 | if (intent.hasExtra("callback")) |
114 | resultReceiver = (ResultReceiver) intent.getParcelableExtra("callback"); | 115 | resultReceiver = (ResultReceiver) intent.getParcelableExtra("callback"); |
115 | startservice(); | 116 | if (!rbLibLoaded) |
117 | startservice(); | ||
116 | 118 | ||
117 | /* Display a notification about us starting. | 119 | /* Display a notification about us starting. |
118 | * We put an icon in the status bar. */ | 120 | * We put an icon in the status bar. */ |
@@ -218,6 +220,7 @@ public class RockboxService extends Service | |||
218 | } | 220 | } |
219 | 221 | ||
220 | System.loadLibrary("rockbox"); | 222 | System.loadLibrary("rockbox"); |
223 | rbLibLoaded = true; | ||
221 | if (resultReceiver != null) | 224 | if (resultReceiver != null) |
222 | resultReceiver.send(RESULT_LIB_LOADED, null); | 225 | resultReceiver.send(RESULT_LIB_LOADED, null); |
223 | main(); | 226 | main(); |