Commit graph

21 commits

Author SHA1 Message Date
Jan Holesovsky
c2385112ac android: Make all the .uno: commands work again.
Was a problem introduced by c6f36965cf.

Change-Id: I8fbc722ed73af19a6462c87242d431eea118f1a2
Reviewed-on: https://gerrit.libreoffice.org/85020
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-12 10:17:16 +01:00
Pedro Pinto Silva
1a6ab5ae28 android: Brazil Portuguese translations of the lib.
Change-Id: I587a69518d23c7f2a7580918610619bd78821754
Reviewed-on: https://gerrit.libreoffice.org/84982
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-11 20:43:57 +01:00
Eloy Crespo
166a0f2c02 android: Spanish translations of the lib.
Change-Id: I8fc84c9d406a2cd7be840ec2f6e09a9869e8e157
Reviewed-on: https://gerrit.libreoffice.org/84981
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-11 20:43:31 +01:00
Michael Meeks
e12de33ecf android: encode SCHEME_FILE paths as URIs not paths.
Fixes encoding problems particularly with eg.
SCHEME_FILE: getPath(): /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/user@demoserver.com%2Fnextcloud/test.docx

Change-Id: I0f2a84ff29fffd87ef059727bfb530bb54ab2ab9
Reviewed-on: https://gerrit.libreoffice.org/84936
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-11 13:22:49 +01:00
Jan Holesovsky
0cd43ead59 android: Make the localization work for the JS pieces.
To have the menu translated.

Change-Id: I8d4d90d260aa3fcd80a8eb68515b22c58c9b3e18
Reviewed-on: https://gerrit.libreoffice.org/84931
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-11 11:49:37 +01:00
Jan Holesovsky
0b90f8cece android: Fix crash when starting a slideshow.
Change-Id: Iff5e4feaf4d1c496713a6401f6f03a17ae326ec5
Reviewed-on: https://gerrit.libreoffice.org/84905
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-10 23:05:12 +01:00
Jan Holesovsky
07c3a7bdbb android: Implement uploading back to the cloud storage.
All these cases should be covered:

* user's explicit save via File -> Save
* autosave
* autosave on exit

Implemented via IntentFilter magic, we can call back from one activity
to the other to perform the actual saving in the shell.

Change-Id: I97d6e94028a9600a71f030af7146ee01163d09b8
Reviewed-on: https://gerrit.libreoffice.org/84872
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-10 17:14:03 +01:00
Jan Holesovsky
c6f36965cf android: Framework to be able to broadcast to another activity.
Change-Id: I24634c5e06223bd1c5cdb8da511159b03ce35719
Reviewed-on: https://gerrit.libreoffice.org/84871
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-10 17:10:29 +01:00
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