Commit Graph

1522 Commits

Author SHA1 Message Date
Tomaž Vajngerl
79317f2fef android: Fix loading files that have space in the filename
Change-Id: Icf540bf199b3daf79e4eca9b0a403978b6cae18c
2015-01-26 10:27:43 +01:00
Jan Holesovsky
167412ce5e android: Add makefile rule to sign the resulting .apk.
To sign, do:

cd android
make key=<your_key_name> sign

Change-Id: I20214e034f997125ccfd122b97d18ae141130336
2015-01-26 10:27:42 +01:00
Miklos Vajna
94ec99db8a android: fix crash in tile provider while closing the document
The problem was that for large documents if "back" was pressed quickly,
then we closed the document, but rendering thumbnails for the different
parts was still in progress.

Just make sure we don't crash when the underlying document is gone.

E/AndroidRuntime( 8902): java.lang.NullPointerException
E/AndroidRuntime( 8902):        at org.libreoffice.LOKitTileProvider.thumbnail(LOKitTileProvider.java:244)
E/AndroidRuntime( 8902):        at org.libreoffice.ThumbnailCreator$ThumbnailCreationTask.getThumbnail(ThumbnailCreator.java:78)
E/AndroidRuntime( 8902):        at org.libreoffice.LOKitThread.createThumbnail(LOKitThread.java:170)
E/AndroidRuntime( 8902):        at org.libreoffice.LOKitThread.processEvent(LOKitThread.java:148)
E/AndroidRuntime( 8902):        at org.libreoffice.LOKitThread.run(LOKitThread.java:120)

Change-Id: I93e8e1ea19545ca196ef6f59d19528bb42f3676d
2015-01-26 10:27:42 +01:00
Jan Holesovsky
2b67566ade android: Set the debug / release according to the configure setting.
Change-Id: Ic1c4328b21e1cdca2fdb1aee72b8563af8f770c7
2015-01-26 10:27:41 +01:00
Jan Holesovsky
722d4f0cab android: Fix release build via top level 'make'.
Change-Id: I342e3dfd1e142d4be14162fd8a68876d038ed5ea
2015-01-26 10:27:41 +01:00
Jan Holesovsky
609367d3c9 android: Set the package name correctly.
Change-Id: Iab771f65121e477cda871a04098df306399628e7
2015-01-26 10:27:41 +01:00
Miklos Vajna
ef99aeea0e android: eliminate hardcoded LibreOfficeMainActivity and package in LOAbout
Change-Id: I276f27a96b4fb970520dec588b9321731e7fc26b
2015-01-26 10:27:41 +01:00
Tomaž Vajngerl
872e5d8551 Revert "android: store tiles in Map for faster access to tiles"
This reverts commit 6263bcfd70.

Conflicts:
	android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java

Change-Id: I2fbd0b67aa3ccf0f629ce4af8788236d297144e5
2015-01-26 10:27:41 +01:00
Tomaž Vajngerl
784a1765d7 android: guard rendering if buffer could not be allocated
Change-Id: I51a8f7f56531e5f0c4cb966c44be40913c557da7
2015-01-26 10:27:40 +01:00
Tomaž Vajngerl
3596abe1d8 android: getRect renamed to getRectF - adapt the code to this
Change-Id: Id0248803fbd8fedf846d7741a2faddb9bfd171e0
2015-01-26 10:27:40 +01:00
Tomaž Vajngerl
3135fbb42e android: invalidate only new/changed tiles - big perf. improvement
Previously on every rerender or draw event all tiles were
invalidated (which means they were reuploaded to GPU even when
the tiles didn't change). This was changed to only invalidate
tiles that did actually change.

Change-Id: I50a8b51b9d5b44797ac3e2dedd20cfb07fb2bb8b
2015-01-26 10:27:40 +01:00
Tomaž Vajngerl
5ad4180191 android: make editing switchable via LOKitShell
Change-Id: I329dbead616527a985eba1f3b42cddf573501e86
2015-01-26 10:27:40 +01:00
Tomaž Vajngerl
07a736ff67 android: add getCSSRect to TileIdentifier and use id in SubTile
Change-Id: I565a5f88d5913f5337f5c3d32d54be71a32f542a
2015-01-26 10:27:40 +01:00
Tomaž Vajngerl
f3fdc828f1 android: small cleanup of ComposedTileLayer
Change-Id: Ifa4b35fa23a754c0ba0dbf63653986e61e6cb399
2015-01-26 10:27:39 +01:00
Tomaž Vajngerl
70766d8cb7 android: construct a "css" rect of the tile in TileIdentifier
Change-Id: I98417dbb6b607b127540292fcae6a8efce4a7da4
2015-01-26 10:27:39 +01:00
Tomaž Vajngerl
61c368ddde android: cleanup new tileid's if they gone out of viewport scope
It can happen that the viewport moves so fast that the tileid is
not valid anymore before it could even be rendered to.

Change-Id: I5ff7d3de6b289ca48ea8a8974705d8306e1be86b
2015-01-26 10:27:39 +01:00
Miklos Vajna
d38b6618ca android: make the about dialog scrollable
Content was cut in landscape mode on smaller screens.

Change-Id: Ic3b52da7a4ba9e093946be814afa93226cc34c4b
2015-01-26 10:27:39 +01:00
Tomaž Vajngerl
a4684722cc android: revert the app package name & relative activity name
Package name must stay "org.libreoffice" as code gen uses this
for the package name of resources (generated org.libreoffice.R)
which we reference in the source code. Usual practice is to change
the package name at packaging step. The code was changed to allow
this.

Change-Id: I4e36f46c4b8d620f3c9b20fe4fd39737c76624bc
2015-01-26 10:27:38 +01:00
Tomaž Vajngerl
aff19a6c8c android: add dummy resurce to get the correct package name
Change-Id: I27a40108d9523058b6340d870105667bb4c0bdae
2015-01-26 10:27:38 +01:00
Tomaž Vajngerl
7aad6171fa android: don't need Bootstrap anymore
Change-Id: I271ab1e7e99dedf46e000169c6b7374898421747
2015-01-26 10:27:38 +01:00
Tomaž Vajngerl
f34f51bfbf android: eliminate hardcoded LibreOfficeMainActivity and package
Change-Id: I365ea3b51d9a8d965eca996d100441d24b8ff5a6
2015-01-26 10:27:37 +01:00
Tomaž Vajngerl
166df60cfc android: Remove 200kb docu.png from resources as it is not used
Change-Id: I524669456a2ea2725d09363e2574079ade172df1
2015-01-26 10:27:37 +01:00
Miklos Vajna
07997cba77 android: adapt doc browser to updated manifest that accepts Calc documents
Change-Id: I5398e225631097b31aa4f8418ffa40a6db323a42
2015-01-26 10:27:37 +01:00
Tomaž Vajngerl
d4ebde60a8 android: re-enable calc documents associations with LO viewer
Change-Id: I89424e575a926c189be499e5fe2b811817ccd2fb
2015-01-26 10:27:36 +01:00
Miklos Vajna
462d48ccf5 android: make package name configurable
Change-Id: I3897c551676bcb7d3237be3dde74123c5ddd8f84
2015-01-26 10:27:36 +01:00
Miklos Vajna
6debb045a0 android: show vendor in LOAbout
Change-Id: Iddcf953718083b218d41fcb895d28adb5808a8f4
2015-01-26 10:27:36 +01:00
Tomaž Vajngerl
d1aad6177c android: fix invalidation rect calculation in ComposedTileLayer
Change-Id: I5e0a59d6b966daea2a2033b0f52dc6983b837ca1
2015-01-26 10:27:35 +01:00
Tomaž Vajngerl
96fa96b084 android: cleanup GeckoLayerClient
Change-Id: If9a7c50249c9e44dce1a8e3c02a8b2f568dedfb1
2015-01-26 10:27:35 +01:00
Tomaž Vajngerl
29d65fbdb5 android: remove getDisplayMetrics as it exists in LOKitShell
Change-Id: I5e7fa1b9c99707db382c555c5ffdfe601eb4622a
2015-01-26 10:27:34 +01:00
Tomaž Vajngerl
3cb66f5ef8 android: move getMemoryClass to LOKitShell
Change-Id: I2db92ec20c1999c0a4373fa25690680cacd79331
2015-01-26 10:27:34 +01:00
Jacobo Aragunde Pérez
61682ae511 Android: i18n-ized document provider names.
The factory will need access to the Context to be able to transform
the resources into Strings, and the only way to receive it is from
the Activity. Implemented initialize(Context) for that reason.

Change-Id: If6e81a9c4ad73180851e43968ac97aa1e74231e7
2015-01-19 09:46:44 +00:00
Jacobo Aragunde Pérez
9f3716cb7d Android: reimplement DocumentProviderFactory as a singleton
The factory will require some objects that are not available from a
static context.

Change-Id: Idf852f5b9ab3023644b1a9577951a94c4f21c4e9
2015-01-19 09:46:44 +00:00
Jacobo Aragunde Pérez
e0517616fa Android: prevent browsing further than the root directory.
We must ensure that two LocalFile objects pointing to the same File
are equal so the check to decide if the application button means "up"
works.

Change-Id: Ib83b34a210eec9a3f038c27d27a4e9b305c98ef9
2015-01-19 09:46:43 +00:00
Jacobo Aragunde Pérez
233138918d Android: add UI selector for the available IDocumentProviders.
Implemented a DrawerLayout in the main activity where the providers
are listed. Also added the class DocumentProviderFactory which keeps
the instances of the providers.

Change-Id: I821958e93b9ea1008921db321e825648a8766405
2015-01-19 09:46:43 +00:00
Jacobo Aragunde Pérez
280f1c03a7 Android: implement LocalDocumentsDirectoryProvider.
A convenience Document Provider to browse the /sdcard/Documents
directory.

Change-Id: Ib412d9b54dfb0e54ac014cf80ce94f067b2f4924
2015-01-19 09:46:43 +00:00
Jacobo Aragunde Pérez
2ac02d6083 Android: Abstract file management from LibreOfficeUIActivity.
This is the first step towards implementing support for different
cloud providers.

The use of File objects is replaced with the interface IFile, which
has similar operations. A LocalFile implementation is provided to
deal with local contents in the same way it was being done before.

Some system-wide storage operations are abstracted in the interface
IDocumentProvider. A LocalDocumentsProvider implementation is
provided.

Known issues in this patch:

* Dummy filesystem code has been removed. This should be provided as
  an implementation of IDocumentProvider in case we need it, but that
  will probably not happen.

* Sorting is not implemented in LocalDocumentsProvider yet. It seemed
  not to be working anyway.

* Code to get directory thumbnails has been commented out. This code
  will probably belong to the IDocumentProvider/IFile implementations.
  We might want to have a different approach instead of reading
  hidden thumbnail files, something similar to what the native
  Start Center does.

Change-Id: Ib0882c69a0b24e28d2346bbe0154db01d1102b06
2015-01-19 09:46:42 +00:00
Jacobo Aragunde Pérez
4bb76ebfb8 Android: remove unnecessary openDirectory call from onResume.
The call to createUI already performs all the actions done by
openDirectory, there is no need to call it again.

Change-Id: I7f900a23a4f85b627b7132dd6eb54b6e98e7edb6
2015-01-19 09:46:42 +00:00
Tomaž Vajngerl
bd065f5aba android: Add key events in TileProvider & pass key events to LOK
Change-Id: Id0a93f1c4199082b3c67802955082d04831ec124
2015-01-16 13:18:33 +01:00
Tomaž Vajngerl
89d41753df android: Add needed services for editing.
Change-Id: I29acea58b4e18efcf33b51361812c3f7532282ab
2015-01-16 13:18:33 +01:00
Tomaž Vajngerl
389fae7cba android: Add some comments.
Change-Id: I77372ae2b1c7c4332dc4a8c244c67a82f9551e22
2015-01-16 13:18:33 +01:00
Tomaž Vajngerl
3766397781 android: add missing break
Change-Id: I5e9598249457c62d3ccc9c5f754526c1fbe969bf
2015-01-16 13:18:33 +01:00
Tomaž Vajngerl
b7469087e1 android: add key_press event and send them to LOKitThread
Change-Id: I306fbe12e0a91e28bb2308074ded03b768173440
2015-01-16 13:18:32 +01:00
Tomaž Vajngerl
56e7490ee6 android: remove invalidation registration on touch for now
Change-Id: I7b3acba83de0c17bd4723fb6623827dbbb82fbbf
2015-01-16 13:18:32 +01:00
Tomaž Vajngerl
d6a1db752d android: register invalidtion callback on first touch
Change-Id: I3a98358934b79a2ace574714aa331fdce4a421bb
2015-01-16 13:18:32 +01:00
Tomaž Vajngerl
6263bcfd70 android: store tiles in Map for faster access to tiles
Change-Id: I54c5fbe0b24ecf82de2d3d9f72d7f72d59125d58
2015-01-16 13:18:31 +01:00
Tomaž Vajngerl
6b71410185 android: create tile outside of beginTransaction
Change-Id: Iaf8339f1cadc4f77dfefb1e268126745d6ed7eaa
2015-01-16 13:18:31 +01:00
Tomaž Vajngerl
24a92a4350 android: simplify methods with currentZoom / currentViewport
Change-Id: I6134d434ca34c0f3e839a3d78b67c5cefff53a48
2015-01-16 13:18:31 +01:00
Tomaž Vajngerl
4712db6bb7 android: add onTrimMemory to ComposedTileLayer
Change-Id: I9c85aa5de1495e16ec67f68043784c661c2b66ab
2015-01-16 13:18:31 +01:00
Tomaž Vajngerl
7cb282b02c android: provide context to ComposedTileLayer
Change-Id: If42dc9487fe11e2950becaf6b9ec857496dc6669
2015-01-16 13:18:31 +01:00
Tomaž Vajngerl
a5e2c361f0 android: guard buffer allocation and return null if alloc. fails
Change-Id: I684c7af245cc755b94f69e175c652d161e0f643a
2015-01-16 13:18:31 +01:00