[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 09f97af0c82cdcd0622abe651ad09232ae7cfa5c Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Mon Nov 17 13:42:41 2014 +0100 android: Change the handle type (long too ByteBuffer) Change-Id: Ia2ed94dbbb43d2e768da5af5ca7a51f5cda5bae0 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java index d4531d1..3455b7c 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java @@ -49,7 +49,7 @@ public class LOKitTileProvider implements TileProvider { Log.i(LOGTAG, mOffice.documentLoad() returned null, trying to restart 'Office' and loading again); mOffice.destroy(); Log.i(LOGTAG, mOffice.destroy() done); -long handle = LibreOfficeKit.getLibreOfficeKitHandle(); +ByteBuffer handle = LibreOfficeKit.getLibreOfficeKitHandle(); Log.i(LOGTAG, getLibreOfficeKitHandle() = + handle); mOffice = new Office(handle); Log.i(LOGTAG, new Office created); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fa57c94e868a5cd06b057aecbed28d9e88ed4354 Author: Tor Lillqvist t...@collabora.com Date: Fri Oct 24 17:17:35 2014 +0300 Revert Temporarily do more verbose logging This reverts commit 00d2482326af17ac61d3c2aaa21d837f0e72bb37. diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java index a63bf4c..1bc6499 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java @@ -36,7 +36,7 @@ public class LOKitTileProvider implements TileProvider { mTileWidth = pixelToTwip(TILE_SIZE, mDPI); mTileHeight = pixelToTwip(TILE_SIZE, mDPI); -LibreOfficeKit.putenv(SAL_LOG=+WARN+INFO); +LibreOfficeKit.putenv(SAL_LOG=-WARN+INFO.lok); LibreOfficeKit.init(LibreOfficeMainActivity.mAppContext); mOffice = new Office(LibreOfficeKit.getLibreOfficeKitHandle()); @@ -54,7 +54,7 @@ public class LOKitTileProvider implements TileProvider { mOffice = new Office(handle); Log.i(LOGTAG, new Office created); mDocument = mOffice.documentLoad(input); -LibreOfficeKit.putenv(SAL_LOG=+WARN+INFO.lok); +LibreOfficeKit.putenv(SAL_LOG=-WARN+INFO.lok); } Log.i(LOGTAG, mDocument = + mDocument); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java | 12 ++ 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit f6269d2fdab2599a2059f05da5b99a41bad6f406 Author: Tor Lillqvist t...@collabora.com Date: Tue Oct 21 17:27:30 2014 +0300 Log time since object creation, not since epoch Change-Id: I43c7725b88c9326e269abc277f42e47c08acefb5 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java index 74ad782..1bc6499 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java @@ -28,6 +28,8 @@ public class LOKitTileProvider implements TileProvider { private float mWidthTwip; private float mHeightTwip; +private long objectCreationTime = System.currentTimeMillis(); + public LOKitTileProvider(LayerController layerController, String input) { mLayerController = layerController; mDPI = (float) LOKitShell.getDpi(); @@ -166,11 +168,13 @@ public class LOKitTileProvider implements TileProvider { float twipY = pixelToTwip(y, mDPI) / zoom; float twipWidth = mTileWidth / zoom; float twipHeight = mTileHeight / zoom; -long start = System.currentTimeMillis(); -Log.i(LOGTAG, paintTile TOP @ + start + ( + tileSize.width + + tileSize.height + + (int) twipX + + (int) twipY + + (int) twipWidth + + (int) twipHeight + )); +long start = System.currentTimeMillis() - objectCreationTime; + +Log.i(LOGTAG, paintTile @ + start + ( + tileSize.width + + tileSize.height + + (int) twipX + + (int) twipY + + (int) twipWidth + + (int) twipHeight + )); mDocument.paintTile(buffer, tileSize.width, tileSize.height, (int) twipX, (int) twipY, (int) twipWidth, (int) twipHeight); -long stop = System.currentTimeMillis(); -Log.i(LOGTAG, paintTile TAIL @ + stop + - elapsed: + (stop - start) + ); + +long stop = System.currentTimeMillis() - objectCreationTime; +Log.i(LOGTAG, paintTile @ + stop + elapsed: + (stop - start)); } else { Log.e(LOGTAG, Document is null!!); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental configure.ac
android/experimental/LOAndroid3/AndroidManifest.xml.in |2 - configure.ac | 22 ++--- 2 files changed, 14 insertions(+), 10 deletions(-) New commits: commit ff1ad6c235b63c51f5dc25df92dc4235f4609686 Author: Jan Holesovsky ke...@collabora.com Date: Mon Oct 13 10:19:25 2014 +0200 android: When debugging, the installLocation must be internalOnly. Otherwise the gdbserver ends up with run-as: exec failed for /data/data/org.libreoffice/lib/gdbserver Error:Permission denied (you need to run ndk-gdb with --verbose to see that). Change-Id: Iccdf0ff268c20d2fb5abc1e93404375fa51c1cf1 diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in index 989a43c..8eb4dbb 100644 --- a/android/experimental/LOAndroid3/AndroidManifest.xml.in +++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in @@ -1,7 +1,7 @@ ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.libreoffice -android:installLocation=preferExternal +@ANDROID_INSTALL_LOCATION@ android:versionCode=1 android:versionName=1.0 diff --git a/configure.ac b/configure.ac index ed5b1ef..91cc7d0 100644 --- a/configure.ac +++ b/configure.ac @@ -3774,24 +3774,28 @@ AC_MSG_CHECKING([whether to do a debug build]) if test -n $enable_debug test $enable_debug != yes test $enable_debug != no; then AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-selective-debuginfo]) fi -if test -n $ENABLE_DBGUTIL; then -if test $enable_debug = no; then -AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil]) -fi -ENABLE_DEBUG=TRUE -ANDROID_DEBUGGABLE='android:debuggable=true' -AC_MSG_RESULT([yes (dbgutil)]) -elif test -n $enable_debug test $enable_debug != no; then +if test -n $ENABLE_DBGUTIL -a $enable_debug = no; then +AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil]) +fi + +if test -n $ENABLE_DBGUTIL -o \( -n $enable_debug -a $enable_debug != no \) ; then ENABLE_DEBUG=TRUE ANDROID_DEBUGGABLE='android:debuggable=true' -AC_MSG_RESULT([yes]) +ANDROID_INSTALL_LOCATION='android:installLocation=internalOnly' +if test -n $ENABLE_DBGUTIL ; then +AC_MSG_RESULT([yes (dbgutil)]) +else +AC_MSG_RESULT([yes]) +fi else ENABLE_DEBUG= ANDROID_DEBUGGABLE= +ANDROID_INSTALL_LOCATION='android:installLocation=preferExternal' AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DEBUG) AC_SUBST(ANDROID_DEBUGGABLE) +AC_SUBST(ANDROID_INSTALL_LOCATION) dnl Selective debuginfo ENABLE_DEBUGINFO_FOR= ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 25 +++--- 1 file changed, 18 insertions(+), 7 deletions(-) New commits: commit f4c3ab1c80df52129f8f5574cdc6b63aa998f74e Author: Jan Holesovsky ke...@collabora.com Date: Mon Oct 13 07:01:26 2014 +0200 android: When rotating, we also need to update the viewport geometry. Change-Id: I04502c56b1e1d16cf65cbeb47632c508ef9889d0 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index 4c91542..4c5509a 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -45,20 +45,32 @@ public class LOKitThread extends Thread { return true; } -private void refresh() { -Bitmap bitmap = mTileProvider.thumbnail(1000); -if (bitmap != null) { - mApplication.getLayerController().getView().changeCheckerboardBitmap(bitmap, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); +/** Handle the geometry change + draw. */ +private void redraw() { +if (mController == null || mTileProvider == null) { +// called too early... +return; } -mLayerClient.clearAndResetlayers(); draw(); + RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); mController.setPageRect(rect, rect); mController.setViewportMetrics(mController.getViewportMetrics()); mController.setForceRedraw(); } +/** Invalidate everything + handle the geometry change + draw. */ +private void refresh() { +Bitmap bitmap = mTileProvider.thumbnail(1000); +if (bitmap != null) { + mApplication.getLayerController().getView().changeCheckerboardBitmap(bitmap, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); +} + +mLayerClient.clearAndResetlayers(); +redraw(); +} + private void changePart(int partIndex) { LOKitShell.showProgressSpinner(); mTileProvider.changePart(partIndex); @@ -119,8 +131,7 @@ public class LOKitThread extends Thread { draw(); break; case LOEvent.SIZE_CHANGED: -// re-draw when the size has changed -draw(); +redraw(); break; case LOEvent.CHANGE_PART: changePart(event.getPartIndex()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GLThread.java | 178 -- android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java | 45 +- android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java | 143 3 files changed, 165 insertions(+), 201 deletions(-) New commits: commit 6af3f08824a218898ca0af15bd7ee295fa4ab73f Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Sat Oct 4 18:06:39 2014 +0200 android: Rewrite GLThread to trash objects as little as possible Change-Id: I6a0042e2a1b5d98fbf5aa8c64b67a9422f8956a3 diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GLThread.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GLThread.java deleted file mode 100644 index a80ea82..000 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GLThread.java +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- - * * BEGIN LICENSE BLOCK * - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the License); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an AS IS basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Android code. - * - * The Initial Developer of the Original Code is Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011-2012 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Patrick Walton pcwal...@mozilla.com - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the GPL), or - * the GNU Lesser General Public License Version 2.1 or later (the LGPL), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * * END LICENSE BLOCK * */ - -package org.mozilla.gecko.gfx; - -import android.opengl.GLSurfaceView; - -import java.util.concurrent.LinkedBlockingQueue; - -import javax.microedition.khronos.opengles.GL10; - -// A GL thread managed by Java. It is not necessary to use this class to use the -// FlexibleGLSurfaceView, but it can be helpful, especially if the GL rendering is to be done -// entirely in Java. -class GLThread extends Thread { -private LinkedBlockingQueueRunnable mQueue; -private GLController mController; -private boolean mRenderQueued; - -public GLThread(GLController controller) { -mQueue = new LinkedBlockingQueueRunnable(); -mController = controller; -} - -@Override -public void run() { -while (true) { -Runnable runnable; -try { -runnable = mQueue.take(); -} catch (InterruptedException e) { -throw new RuntimeException(e); -} - -runnable.run(); -if (runnable instanceof ShutdownMessage) { -break; -} -} -} - -public void recreateSurface() { -mQueue.add(new RecreateSurfaceMessage()); -} - -public void renderFrame() { -// Make sure there's only one render event in the queue at a time. -synchronized (this) { -if (!mRenderQueued) { -mQueue.add(new RenderFrameMessage()); -mRenderQueued = true; -} -} -} - -public void shutdown() { -mQueue.add(new ShutdownMessage()); -} - -public void surfaceChanged(int width, int height) { -mQueue.add(new SizeChangedMessage(width, height)); -} - -public void surfaceCreated() { -mQueue.add(new SurfaceCreatedMessage()); -} - -public void surfaceDestroyed() { -mQueue.add(new SurfaceDestroyedMessage()); -} - -private void doRecreateSurface() { -mController.disposeGLContext(); -mController.initGLContext(); -} - -private GLSurfaceView.Renderer getRenderer() { -return mController.getView().getRenderer(); -} - -private
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/res/menu/view_menu.xml |4 +--- android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |3 --- 2 files changed, 1 insertion(+), 6 deletions(-) New commits: commit 3d709933f7b2f4763c394de95753f0d9be816fdd Author: Andrzej Hunt andrzej.h...@collabora.com Date: Wed Oct 1 08:13:45 2014 +0100 android: remove preferences menu item for now. The preferences activity doesn't work, so easiest not to try to use it until it is properly implemented. Change-Id: I4b4195f6dcafa3c99dbef1ae3044ea18ab173c21 diff --git a/android/experimental/LOAndroid3/res/menu/view_menu.xml b/android/experimental/LOAndroid3/res/menu/view_menu.xml index f1fc362..dca660a 100644 --- a/android/experimental/LOAndroid3/res/menu/view_menu.xml +++ b/android/experimental/LOAndroid3/res/menu/view_menu.xml @@ -11,6 +11,4 @@ android:title=@string/menu_sort_az/ item android:id=@+id/menu_sort_modified android:title=@string/menu_sort_modified/ - item android:id=@+id/menu_preferences - android:title=@string/menu_preferences/ -/menu \ No newline at end of file +/menu diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index feb74b3..db3559e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -276,9 +276,6 @@ public class LibreOfficeUIActivity extends Activity implements ActionBar.OnNavig case R.id.menu_sort_modified: sortFiles(item); break; -case R.id.menu_preferences: -editPreferences(item); -break; default: return super.onOptionsItemSelected(item); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental configure.ac
android/experimental/LOAndroid3/AndroidManifest.xml| 84 - android/experimental/LOAndroid3/AndroidManifest.xml.in | 84 + configure.ac |8 + 3 files changed, 91 insertions(+), 85 deletions(-) New commits: commit 1f3505f01bf62cfb6885258c1babb06f61811ca8 Author: Jan Holesovsky ke...@collabora.com Date: Wed Oct 1 17:01:59 2014 +0200 android: android:debuggable setting now depends on configure options. Change-Id: I12d9c05fb05e4cf202c5c0d7b7e87c145d163fea diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml b/android/experimental/LOAndroid3/AndroidManifest.xml.in similarity index 99% rename from android/experimental/LOAndroid3/AndroidManifest.xml rename to android/experimental/LOAndroid3/AndroidManifest.xml.in index 83608b8..cfd369a 100644 --- a/android/experimental/LOAndroid3/AndroidManifest.xml +++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in @@ -11,7 +11,7 @@ uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ application -android:debuggable=true +@ANDROID_DEBUGGABLE@ android:allowBackup=true android:icon=@drawable/main android:label=@string/app_name diff --git a/configure.ac b/configure.ac index 4bb0b5b..ed5b1ef 100644 --- a/configure.ac +++ b/configure.ac @@ -3779,15 +3779,19 @@ if test -n $ENABLE_DBGUTIL; then AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil]) fi ENABLE_DEBUG=TRUE +ANDROID_DEBUGGABLE='android:debuggable=true' AC_MSG_RESULT([yes (dbgutil)]) elif test -n $enable_debug test $enable_debug != no; then ENABLE_DEBUG=TRUE +ANDROID_DEBUGGABLE='android:debuggable=true' AC_MSG_RESULT([yes]) else ENABLE_DEBUG= +ANDROID_DEBUGGABLE= AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DEBUG) +AC_SUBST(ANDROID_DEBUGGABLE) dnl Selective debuginfo ENABLE_DEBUGINFO_FOR= @@ -4443,6 +4447,7 @@ if test $cross_compiling = yes; then bin/get_config_variables \ solenv/bin/getcompver.awk \ solenv/inc/langlist.mk \ +android/experimental/LOAndroid3/AndroidManifest.xml.in \ config_host.mk.in \ Makefile.in \ lo.xcent.in \ @@ -12789,7 +12794,8 @@ if test -f config_host.mk; then config_md5=`$MD5SUM config_host.mk | sed s/ .*//` fi -AC_CONFIG_FILES([config_host.mk +AC_CONFIG_FILES([android/experimental/LOAndroid3/AndroidManifest.xml + config_host.mk Makefile lo.xcent instsetoo_native/util/openoffice.lst ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/res/layout/activity_main.xml |3 + android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java | 20 +- android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 11 ++--- android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java |4 +- 4 files changed, 27 insertions(+), 11 deletions(-) New commits: commit d39e83c2c3478efd83601ca2403ff27895848728 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 23:08:27 2014 +0200 android: show progress spinner also when switching parts Change-Id: Ie21e71aa03eddef620d470e01daf6f1936a5d7c7 diff --git a/android/experimental/LOAndroid3/res/layout/activity_main.xml b/android/experimental/LOAndroid3/res/layout/activity_main.xml index 9ada4d3..fd7d63b 100644 --- a/android/experimental/LOAndroid3/res/layout/activity_main.xml +++ b/android/experimental/LOAndroid3/res/layout/activity_main.xml @@ -22,7 +22,8 @@ android:id=@+id/loadingPanel android:layout_width=match_parent android:layout_height=match_parent -android:gravity=center +android:gravity=center +android:background=#9333 ProgressBar android:layout_width=wrap_content diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java index 332e0f8..7161f14 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java @@ -10,7 +10,7 @@ public class LOKitShell { public static float getDpi() { DisplayMetrics metrics = LibreOfficeMainActivity.mAppContext.getResources().getDisplayMetrics(); -return metrics.density * 160; +return metrics.density * 160; } public static void sendEvent(LOEvent event) { @@ -27,4 +27,22 @@ public class LOKitShell { public static void queueRedraw() { LOKitShell.sendEvent(LOEventFactory.redraw()); } + +public static void showProgressSpinner() { +getMainHandler().post(new Runnable() { +@Override +public void run() { +LibreOfficeMainActivity.mAppContext.showProgressSpinner(); +} +}); +} + +public static void hideProgressSpinner() { +getMainHandler().post(new Runnable() { +@Override +public void run() { +LibreOfficeMainActivity.mAppContext.hideProgressSpinner(); +} +}); +} } diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index 31b9eb5..398389b 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -55,8 +55,10 @@ public class LOKitThread extends Thread { } private void changePart(int partIndex) { +LOKitShell.showProgressSpinner(); mTileProvider.changePart(partIndex); refresh(); +LOKitShell.hideProgressSpinner(); } private boolean load(String filename) { @@ -76,14 +78,9 @@ public class LOKitThread extends Thread { boolean isReady = mTileProvider.isReady(); if (isReady) { +LOKitShell.showProgressSpinner(); refresh(); -LOKitShell.getMainHandler().post(new Runnable() { -@Override -public void run() { -LibreOfficeMainActivity.mAppContext.hideProgressBar(); -} -}); - +LOKitShell.hideProgressSpinner(); } return isReady; } diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 1fce7d4..8607ebf 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -199,11 +199,11 @@ public class LibreOfficeMainActivity extends Activity { } -public void showProgressBar() { +public void showProgressSpinner() { findViewById(R.id.loadingPanel).setVisibility(View.VISIBLE); } -public void hideProgressBar() { +public void hideProgressSpinner() { findViewById(R.id.loadingPanel).setVisibility(View.GONE); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java |4 1 file changed, 4 insertions(+) New commits: commit 76ea22920c749f9f9252d20f576fb1a3b09a333e Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 23:37:14 2014 +0200 android: Log calls to createTile Change-Id: Ia0e92c24f771d47235fee7a9dbddc65631af9082 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java index 073876e..4fdf84f 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java @@ -141,7 +141,11 @@ public class LOKitTileProvider implements TileProvider { float twipY = pixelToTwip(y, mDPI) / zoom; float twipWidth = mTileWidth / zoom; float twipHeight = mTileHeight / zoom; +long start = System.currentTimeMillis(); +Log.i(LOGTAG, paintTile TOP @ + start + ( + TILE_SIZE + + TILE_SIZE + + (int)twipX + + (int)twipY + + (int) twipWidth + + (int) twipHeight + )); mDocument.paintTile(buffer, TILE_SIZE, TILE_SIZE, (int) twipX, (int) twipY, (int) twipWidth, (int) twipHeight); +long stop = System.currentTimeMillis(); +Log.i(LOGTAG, paintTile TAIL @ + stop + - elapsed: + (stop - start) + ); } else { Log.e(LOGTAG, Document is null!!); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/res/values/strings.xml |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 43fc93053a6bbb24550cd9a9b0110e9fef01b02c Author: Jan Holesovsky ke...@collabora.com Date: Wed Oct 1 22:48:38 2014 +0200 android: Fix typo. Change-Id: I22f7bbcc5bc5f58c30a5915c876736f664a42a61 diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml index d04f92e..f913e5e 100644 --- a/android/experimental/LOAndroid3/res/values/strings.xml +++ b/android/experimental/LOAndroid3/res/values/strings.xml @@ -4,8 +4,8 @@ string name=app_nameLibreOffice Viewer/string string name=app_about_namebLibreOffice Viewer \'Beta\'/b/string -string name=app_descriptionLibreOffice Viewer is an document viewer based on LibreOffice/string -string name=app_creditshttp://www.libreoffice.com/string +string name=app_descriptionLibreOffice Viewer is a document viewer based on LibreOffice/string +string name=app_creditshttp://www.libreoffice.org/string string name=browser_app_nameLibreOffice Browser/string string name=menu_searchSearch/string ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - android/experimental
android/experimental/LOAndroid3/res/layout/activity_main.xml | 12 ++ android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java |7 + android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java |8 ++ 3 files changed, 27 insertions(+) New commits: commit 3d86ed49d5278568eef6441c71fcd4001edae392 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Tue Sep 30 18:00:54 2014 +0200 android: show loading animation until the document is loaded Change-Id: I98eeafe30e90d039175daea65428526a95c9ff1e diff --git a/android/experimental/LOAndroid3/res/layout/activity_main.xml b/android/experimental/LOAndroid3/res/layout/activity_main.xml index 9ada4d3..799f591 100644 --- a/android/experimental/LOAndroid3/res/layout/activity_main.xml +++ b/android/experimental/LOAndroid3/res/layout/activity_main.xml @@ -44,4 +44,16 @@ android:background=#9FFF android:choiceMode=singleChoice/ +RelativeLayout +android:id=@+id/loadingPanel +android:layout_width=match_parent +android:layout_height=match_parent +android:gravity=center + +ProgressBar +android:layout_width=wrap_content +android:layout_height=wrap_content +android:indeterminate=true / +/RelativeLayout + /android.support.v4.widget.DrawerLayout diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index ef75ae5..54478bf 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -76,6 +76,13 @@ public class LOKitThread extends Thread { boolean isReady = mTileProvider.isReady(); if (isReady) { refresh(); +LOKitShell.getMainHandler().post(new Runnable() { +@Override +public void run() { +LibreOfficeMainActivity.mAppContext.hideProgressBar(); +} +}); + } return isReady; } diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 64d70d0..a37438e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -195,6 +195,14 @@ public class LibreOfficeMainActivity extends Activity { } +public void showProgressBar() { +findViewById(R.id.loadingPanel).setVisibility(View.VISIBLE); +} + +public void hideProgressBar() { +findViewById(R.id.loadingPanel).setVisibility(View.GONE); +} + private class DocumentPartClickListener implements android.widget.AdapterView.OnItemClickListener { @Override public void onItemClick(AdapterView? parent, View view, int position, long id) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits