diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-27 22:30:57 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-28 22:32:47 +0200 |
commit | 590fdf41164347f113cccc01953eefe6ef1020a8 (patch) | |
tree | f71f5fc42993a612cf5de8468445be1641b4e9dc | |
parent | 40e919d2a19066bd7bcbbd4ece2eae75a1fd20a5 (diff) |
android: solve black screen on load - call setForceRedraw
Change-Id: Ia9ae05a14c0c751fde961186be350d57d5308519
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index 349de7b4a679..ddc18d4eb885 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -7,6 +7,7 @@ import android.util.DisplayMetrics; import android.util.Log; import org.mozilla.gecko.gfx.GeckoLayerClient; +import org.mozilla.gecko.gfx.LayerController; import org.mozilla.gecko.gfx.ViewportMetrics; import java.util.concurrent.LinkedBlockingQueue; @@ -19,6 +20,8 @@ public class LOKitThread extends Thread { private TileProvider mTileProvider; private ViewportMetrics mViewportMetrics; private boolean mCheckboardImageSet = false; + private GeckoLayerClient mLayerClient; + private LayerController mController; public LOKitThread() { TileProviderFactory.initialize(); @@ -55,16 +58,21 @@ public class LOKitThread extends Thread { if (mApplication == null) { mApplication = LibreOfficeMainActivity.mAppContext; } + + mController = mApplication.getLayerController(); + mLayerClient = mApplication.getLayerClient(); + if (mTileProvider != null) { mTileProvider.close(); } - GeckoLayerClient layerClient = mApplication.getLayerClient(); - mTileProvider = TileProviderFactory.create(mApplication.getLayerController(), filename); - layerClient.setTileProvider(mTileProvider); + + mTileProvider = TileProviderFactory.create(mController, filename); + mLayerClient.setTileProvider(mTileProvider); boolean isReady = mTileProvider.isReady(); if (isReady) { updateCheckbardImage(); + mController.setForceRedraw(); } return isReady; } |