Commit Graph

36 Commits

Author SHA1 Message Date
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
07c1b61933 Small refactoring of the Android "desktop app" code, no functional change
Move the native methods out to a separate AppSupport class so that they aren't
in our "experimenal" Desktop app's namespace. Don't hardcode the name of that
class in the native code, but have the app register the class to which the
damage callbacks should be done.

Possibly the AppSupport and Bootstrap classes should be combined. Later.

Also, the "android" part of the package name is superfluous; it is
Android-specific code, no information gained by having an "android" part in
the package name.

Change-Id: Iddf55c8034ead7693887ace8438deb002c5eea9f
2013-04-19 18:50:36 +03:00
e4bad391fc createWindowFoo is unused
Change-Id: Ia61efc5d5ee65178fd7d868cb57eed9ba3c0519e
2013-02-26 23:48:54 +02:00
388b72742a We are not using NativeActivity, nor do we plan to, IIUC
Partially revert 52a8744afee2cd589813f0377d93f821fce7aedd, i.e. once again
start to remove stuff related only to using NativeActivity... (Because it is
confusing and misleading to keep it around.) Let's do it in small pieces this
time.

Change-Id: Ifdc52eb0ae32c7c510418611cbf01a857a8bc697
2013-02-22 22:30:23 +02:00
52a8744afe Revert "Clean up remains of NativeActivity-based Android app support"
This reverts commit cecc926070ee3d2ad6296fc5e0cfcde8642bb140.

Conflicts:
	sal/android/lo-bootstrap.c
	sal/inc/osl/detail/android-bootstrap.h
2013-02-21 22:54:36 +02:00
cecc926070 Clean up remains of NativeActivity-based Android app support
We haven't been able to build NativeActivity-based apps (like the
android/qa/sc and anroid/qa/desktop thingies) since we switched to
DISABLE_DYNLOADING and a single DSO liblo-native-code.so anyway.

No lo_main() any more. <sal/main.h> should not be included ever when
compiling for Android of iOS now.

Lots of stuff binned from vcl's androidinst.cxx, in the (vain?) hope
that it will reduce the amount of never invoked GUI code that gets
linked in.

Change-Id: I25f584864c40110774c728a23151e089620442d9
2012-11-21 23:03:57 +02:00
ae81246917 We don't need the library search path anymore
As we don't use any dlopen() etc wrappers now with just one single
DSO, we have no use for the library search path either.

Change-Id: Ifaf11c4785a90fe5c7dafb3310bc7933ea31238c
2012-11-21 15:22:27 +02:00
970b53e050 Enable storing some files gzipped in the .apk
We gzip them separately in the Makefile and the gzipped result will be
stored without (further) compression in the .apk.

Use this to store the ttf font files. Shaves off a bit .apk size.

This might seem a bit odd way to do it, why not store these files in
the normal Zip compressed fashion in the .apk? It seems hard to tell
Ant (based on path, not extension) what files to compress and what
not, so we have to keep telling it to not (further) compress any files
at all.

Change-Id: I0d40d8811e6c9df6b28c285845b1db225507f5d4
2012-11-21 15:05:13 +02:00
4b7e701024 Use DISABLE_DYNLOADING on Android
IN this branch these changes are not conditional. Unclear yet whether
this is what we finally will want to use or not. Maybe should make
these changes conditional and do this stuff in master instead?

Change-Id: I379d570a0e00648d295c675fd90eba6594ba3182
2012-10-11 10:07:05 +03:00
e989d16748 dung out no longer needed initUCBHelper methods; thanks to sberg. 2012-09-19 18:41:45 +01:00
c0bc0003ee RTFM for Arrays.copyOfRange()
Change-Id: Ie0d7bd95207aafb269f23974b8e90fa0b50fdb86
2012-09-05 16:12:14 +03:00
f1aca5bf8a Fix infinite loop introduced by accident
Change-Id: I4aee6214123b14f40e01850e1814a4e2d089ec8c
2012-09-04 14:01:39 +03:00
1060cd8459 Perform setup(Activity) just once
Change-Id: Icf77936c4307f816e85cb840d650a4c958a15995
2012-08-13 07:41:20 +03:00
3ea3c6afa2 Use XToolkit2::createScreenCompatibleDeviceUsingBuffer
Render directly to a direct ByteBuffer allocated on the Java side.

Change-Id: I2d66e4146df77e92260918a78ef22cd9b8c95384
2012-06-12 13:50:50 +03:00
8ae077379e Use 32bpp bitmaps on Android (and iOS)
Modify DocumentLoader correspondingly. Take Android bug 32588 into
account.

Ideal would be to extend the XDevice stuff, or something, so that one
could hand it a pre-allocated RGBA buffer into which the
drawing/rendering would go. Then one could get rid of the silly
convert-to-BMP phase, which prefixes the bitmap data with BMP and DIB
headers (and thus, I guess, has to copy and allocate another
copy). Will see.

Change-Id: I4597cd933db8faa8105dc8f19638d712d5d2238a
2012-06-05 17:17:41 +03:00
9776138e97 Add a BGR to RGBA twiddling JNI function
Change-Id: Iafa2c1805eea2f521479dc97d5668d82b1c91bef
2012-05-31 16:20:53 +03:00
c9f5b8a334 Add temporary test JNI method createWindowFoo()...
Change-Id: I8f99399faa3b0762bdea2aac09f1b849639cd191
2012-05-30 00:02:18 +03:00
7309b1c1dc Add an "extra" called lo-extra-libs for a list of libs to load early
Change-Id: I41900eca9a46acbd2f1dfac98fcfc73a62acc150
2012-05-30 00:02:16 +03:00
1a9be1b62e android: disable document recovery, it doesn't demo so well. 2012-05-28 14:50:50 +01:00
e363e668c7 android: make launcher function as expected - starts writer.
Remove now redundant FONTCONFIG cmdline arguments, and add fallbacks
for not having cmdline arguments in the intent when launching.
2012-05-28 14:50:50 +01:00
1bb9a60a96 android: un-break env. var parsing (sorry) 2012-05-23 15:58:49 +01:00
b36ff96d1d android: make launcher function as expected - starts writer.
Remove now redundant FONTCONFIG cmdline arguments, and add fallbacks
for not having cmdline arguments in the intent when launching.
2012-05-23 15:55:55 +01:00
182c1e4f99 Call lo-bootstrap's redirect_stdio
Change-Id: I45732ac81d00837ce517ed5c527c8c767e690abf
2012-05-16 10:12:25 +03:00
cafcd85774 Set TMPDIR also in non-NativeActivity apps 2012-04-05 20:46:22 +03:00
6b6ca3d116 Automate setting of FONTCONFIG_FILE 2012-04-02 12:39:53 +03:00
a9a50cd9ff Refactor where patch_libgnustl_shared() and extract_files() are called 2012-04-02 12:39:52 +03:00
6db50818c1 Add JNI wrapper for InitUCBHelper() and call it 2012-03-28 16:57:59 +03:00
5814229948 Add JNI wrappers for InitVCL and osl_setCommandArgs 2012-03-22 22:49:48 +02:00
2cbb41b3ab Edit a comment a bit 2012-03-22 22:49:47 +02:00
73a47ed375 Set TMPDIR for osl_getTempDirURL() 2012-01-31 14:06:37 +02:00
427edef2c7 putenv() does seem to be process-wide 2012-01-31 14:05:39 +02:00
420f3f8a5c Add setting environment variables 2012-01-12 01:28:03 +02:00
3267d34fb9 Need to trim trailing newline from the indirect command line string 2012-01-11 14:27:44 +02:00
11c9125c28 Work around http://code.google.com/p/android/issues/detail?id=23351 2012-01-11 13:48:55 +02:00
6aac868d65 Add comment about how to use the lo-strace "extra" (option) 2011-12-22 15:45:33 +02:00
5510127e89 Android code refactorig and hacking
Sorry for the large unstructured commit. But hey, the Android code is
experimental so far.

Extract the native lo-bootstrap code into a fairly normal library
built in sal. (Previously it was the JNI part of the "Bootstrap" app.)
Just linkink normally to liblo-bootstrap from C++ code that uses it
works fine, no need to do a dlsym lookup.

Bootstrap is still a subclass of NativeActivity and can thus still be
used as an "app" (to start unit tests, or whatever), but can also be
used from some other app's Java code to just get access to the
lo-bootstrap native methods.

Introduce a new top-level "module", android, for Bootstrap and the
experiments with DocumentLoader.

Note that the experimental DocumentLoader app still crashes. It can't
create the com.sun.star.frame.Desktop instance.

I spent lots of time debugging in the painfully inadequate
ndk-gdb. (Even the newer gdb build from the "mingw-and-ndk" project is
quite crappy in many ways.) I should really experiment with
corresponding code on a normal platform first before even trying on
Android. Basically, I think that if I just can get the concept of Java
code that instantiates and uses LO components *in-process* working on
a normal desktop platform, it should work on Android, too.
2011-11-30 21:52:52 +02:00