summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-11-05 23:40:05 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-11-05 23:40:05 +0000
commit4f747c1aaa02dac18371bcdde6170fa53d8f23a3 (patch)
treef60157a73c90dd83ed17cf38df3e45bd7464571a /android
parent5e8863073e9b128b13bda8e1d1f014ec820a42cc (diff)
downloadrockbox-4f747c1aaa02dac18371bcdde6170fa53d8f23a3.tar.gz
rockbox-4f747c1aaa02dac18371bcdde6170fa53d8f23a3.tar.bz2
rockbox-4f747c1aaa02dac18371bcdde6170fa53d8f23a3.zip
Android: prevent loading the library twice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28508 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android')
-rw-r--r--android/src/org/rockbox/RockboxService.java5
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
/* locals needed for the c code and rockbox state */
private RockboxFramebuffer fb = null;
private boolean mRockboxRunning = false;
+ private volatile boolean rbLibLoaded;
private Activity current_activity = null;
private IntentFilter itf;
private BroadcastReceiver batt_monitor;
@@ -112,7 +113,8 @@ public class RockboxService extends Service
if (intent.hasExtra("callback"))
resultReceiver = (ResultReceiver) intent.getParcelableExtra("callback");
- startservice();
+ if (!rbLibLoaded)
+ startservice();
/* Display a notification about us starting.
* We put an icon in the status bar. */
@@ -218,6 +220,7 @@ public class RockboxService extends Service
}
System.loadLibrary("rockbox");
+ rbLibLoaded = true;
if (resultReceiver != null)
resultReceiver.send(RESULT_LIB_LOADED, null);
main();