Commit graph

363 commits

Author SHA1 Message Date
Jan Holesovsky
5f9e088fe6 android: Replace the value in fonts with real name instead of 'null'.
Change-Id: Iefb5737662eb5463429951c815e5bb0891abd875
Reviewed-on: https://gerrit.libreoffice.org/84313
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03 14:33:20 +01:00
Jan Holesovsky
9830000feb android: Copy stuff from assets/unpack with every git commit change.
I've just spent many hours debugging why a type is not known to the
cppuhelper and is throwing a "cannot get type description for type ...".
It turned out it was just a stale .rdb on the device that avoided being
updated.

So this change will help developers (much lower risk of stale rdb
files), while not a problem for the releases (each version bump has to
update the rdb's anyway).

Change-Id: Ie73245cfc78da8faf97f08ef52e6358a8e71218d
Reviewed-on: https://gerrit.libreoffice.org/81707
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-10-29 20:51:08 +01:00
Jan Holesovsky
473e52d27b android: Fix a linking problem.
This is needed after core.git's
f68a36b62ed327eb67efdfea0ac46645b4d90877, without it the native code
crashes:

E/AndroidRuntime: FATAL EXCEPTION: main

    Process: com.collabora.libreoffice.debug, PID: 25358
    java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
        at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
        at java.lang.System.loadLibrary(System.java:1667)
        at org.libreoffice.androidlib.LOActivity.<clinit>(LOActivity.java:467)
        at java.lang.Class.newInstance(Native Method)
        at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
	...

Change-Id: If0d0f3ade3d2a5a8692dcc3d79edbfb51cd7e2ed
Reviewed-on: https://gerrit.libreoffice.org/81499
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-10-25 14:31:26 +02:00
Andras Timar
d1ae1b36c2 typo fixes in comments and code
Change-Id: Idd98516d30d98dea18eda9bbec8ac9777063b553
2019-10-08 11:49:45 +02:00
kaishu-sahu
0f9492268e android: add support for screen dimming from JS.
Change-Id: Icd766c7dcc9c2d62ec90945ec88fa46f88a4711d
Reviewed-on: https://gerrit.libreoffice.org/76489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-06 11:23:29 +02:00
Jan Holesovsky
68b33ba7f2 android: Load the document only after we've got the permission.
Without this, the first start was failing, there was only a black screen
and the request for permission.

Change-Id: I7929048ca51b044dcb574f48bd2b7bc9a27e0ec8
2019-07-23 14:20:25 +02:00
Jan Holesovsky
1d549fa9dd android: Obviously we need to request for writing, not only reading.
Change-Id: I68927593bd17a6ee6de0c1d879d6b05372c1350e
2019-07-23 12:40:09 +02:00
kaishu-sahu
73f839164a android: add cut, copy, paste support to document viewer.
Change-Id: I85c3a602ab7e98272a193c392bf7bcfd1050dc90
Reviewed-on: https://gerrit.libreoffice.org/74127
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-07-22 12:03:09 +02:00
Jan Holesovsky
2f7fac7547 android: Fix the LOActivity lifecycle in several ways.
First of all, we shouldn't destroy the document in onStop(), instead do
that in onDestroy().  onStop() should only (auto-)save the document, but
otherwise keep it open, so that when we return from the file picker
Activity, the caret is at the same position as it was before.

In addition to that, we should close any open document before we try to
open the new one (in createLOOLWSD).

And finally, when closing the document, we should wait until after the
LOOLWSD is completely torn down, so that we avoid the risk that the user
tries to load another document too quickly, and the messages from the JS
go into the old, still running LOOLWSD.

Change-Id: Ib775021bccc5d5bc69aae392a88dc62a7c05a8fa
2019-07-19 17:59:06 +02:00
Jan Holesovsky
155718796e android: Fix a threading / ordering issue.
Sometimes when closing & reloading a document, the JS ended up with:

cmd=/storage/0/...document_name... type=unknown

error.  The problem was that the HULLO response came later than the next
message in the queue which was

loolclient 0.1

So LOOLWSd tried to load the document called "loolclient 0.1", which
failed, and then it did not know what to do with the "/storage/0/..."
which it understood as a command.

Seems we don't need to send the stuff from a thread on Android, so let's
avoid that, instead of setting up another sender queue here.

Change-Id: I96b4ad13153f1cad6aeb7fc71efcb402edbdc6d2
2019-07-19 17:58:58 +02:00
kaishu-sahu
89a8ce6009 android: add insert image feature to document viewer
Change-Id: I19cb8ef93606cf1bba7341f0d258487b604ad10e
2019-07-19 17:58:49 +02:00
Jan Holesovsky
fd4d896a7f android: Rename the .xml files to avoid potential conflicts.
Change-Id: I6209309c038f16aff150494adf14953aa6f31541
2019-07-15 19:41:44 +02:00
Jan Holesovsky
2b13c69d75 android: Split the actual editing Activity into an own library.
This way, it is more naturally visible what is the actuall app (with the
initial recent documents / file picker) and the editing part.

Change-Id: Ia764f2900939e980f703e3da9f9abd6c0aee7cbb
2019-07-12 11:52:56 +02:00