diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-23 22:31:55 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-24 20:43:03 +0200 |
commit | 688ff90d32c1b4c56800d242b43b37ed1b990f54 (patch) | |
tree | 21cf224620d12e1bac2bacd3154b2e852c292871 /android | |
parent | 2c15cb70f3f3844dca2e990a41e60183eeb137de (diff) |
android: force initialize LibreOfficeKit, clean-up
Change-Id: I0c7b7d10b34c0f71bf8500696fdbc0ed38303f0e
Diffstat (limited to 'android')
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java | 7 | ||||
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java | 15 |
2 files changed, 10 insertions, 12 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java index c76c0fd7cbaa..e52003946c18 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java +++ b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java @@ -13,16 +13,17 @@ import android.app.Activity; import android.content.pm.ApplicationInfo; import android.util.Log; -import java.io.File; import java.io.InputStream; -import java.nio.ByteBuffer; -import java.util.Arrays; // final because subclassing would be meaningless. public final class LibreOfficeKit { private long handle; + public static void loadStatic() { + + } + // private constructor because instantiating would be meaningless private LibreOfficeKit() { diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 9f9c7ac163a4..284afe92b43a 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -13,6 +13,7 @@ import android.widget.AdapterView; import android.widget.ListView; import android.widget.RelativeLayout; +import org.libreoffice.kit.LibreOfficeKit; import org.mozilla.gecko.gfx.GeckoLayerClient; import org.mozilla.gecko.gfx.LayerController; @@ -84,9 +85,7 @@ public class LibreOfficeMainActivity extends Activity { mAppContext = this; super.onCreate(savedInstanceState); - if (mMainHandler == null) { - mMainHandler = new Handler(); - } + mMainHandler = new Handler(); String inputFile; @@ -101,12 +100,8 @@ public class LibreOfficeMainActivity extends Activity { getActionBar().setDisplayHomeAsUpEnabled(false); getActionBar().setHomeButtonEnabled(false); - if (mGeckoLayout == null) { - mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout); - } - if (mDrawerLayout == null) { - mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); - } + mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout); + mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); if (mDocumentPartViewListAdpater == null) { mDrawerList = (ListView) findViewById(R.id.left_drawer); @@ -116,6 +111,8 @@ public class LibreOfficeMainActivity extends Activity { mDrawerList.setOnItemClickListener(new DocumentPartClickListener()); } + LibreOfficeKit.loadStatic(); + mLayerController = new LayerController(this); mLayerClient = new GeckoLayerClient(this); mLayerController.setLayerClient(mLayerClient); |