diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-13 07:40:27 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-13 07:41:20 +0300 |
commit | 1060cd84591faa2093cfdadf87d7bdfcc11b8dfb (patch) | |
tree | ca2dcafe1cd3173f663a567d68d8fdd825124f31 | |
parent | 2a787251b24f93aa3998fb64afd1aa70096691f9 (diff) |
Perform setup(Activity) just once
Change-Id: Icf77936c4307f816e85cb840d650a4c958a15995
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 15b0f35f3416..b2fc540d0636 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -124,10 +124,17 @@ public class Bootstrap extends NativeActivity public static native void delete_byte_buffer_wrapper(long bbw); + static boolean setup_done = false; + // This setup() method is called 1) in apps that use *this* class as their activity from onCreate(), // and 2) should be called from other kinds of LO code using apps. - public static void setup(Activity activity) + public static synchronized void setup(Activity activity) { + if (setup_done) + return; + + setup_done = true; + String dataDir = null; ApplicationInfo ai = activity.getApplicationInfo(); |