[Libreoffice-commits] .: android/Bootstrap

Tor Lillqvist tml at kemper.freedesktop.org
Sun Aug 12 21:49:31 PDT 2012


 android/Bootstrap/src/org/libreoffice/android/Bootstrap.java |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 1060cd84591faa2093cfdadf87d7bdfcc11b8dfb
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Aug 13 07:40:27 2012 +0300

    Perform setup(Activity) just once
    
    Change-Id: Icf77936c4307f816e85cb840d650a4c958a15995

diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 15b0f35..b2fc540 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();


More information about the Libreoffice-commits mailing list