summaryrefslogtreecommitdiff
path: root/sal/android
AgeCommit message (Collapse)Author
2012-09-21Guard against lack of slashes in dli_fnameTor Lillqvist
Change-Id: Id9c452d9c1034f2e7969a9eae7588f2eb81a8813
2012-09-19dung out no longer needed initUCBHelper methods; thanks to sberg.Michael Meeks
2012-09-05Detach thread before returning from android_main()Tor Lillqvist
Change-Id: I593e94e90971b6be681de48dce74f7df2293c10e
2012-08-16For kicks, enable cross-building for Android on MIPSTor Lillqvist
Change-Id: I6fa2b9a50c525fb2d8666a144409eb9a3ad2698a
2012-08-06android: expose dummy JNI gnustl patching method for x86Michael Meeks
2012-07-20android: x86 porting work.Michael Meeks
2012-06-12Use XToolkit2::createScreenCompatibleDeviceUsingBufferTor Lillqvist
Render directly to a direct ByteBuffer allocated on the Java side. Change-Id: I2d66e4146df77e92260918a78ef22cd9b8c95384
2012-06-05Use 32bpp bitmaps on Android (and iOS)Tor Lillqvist
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-05-31Add a BGR to RGBA twiddling JNI functionTor Lillqvist
Change-Id: Iafa2c1805eea2f521479dc97d5668d82b1c91bef
2012-05-30Add temporary test JNI method createWindowFoo()...Tor Lillqvist
Change-Id: I8f99399faa3b0762bdea2aac09f1b849639cd191
2012-05-16Create the redirection thread in detached stateTor Lillqvist
Change-Id: I293fa84452f00a41f4a33d4a45eee6d1a32ff761
2012-05-16Add stdout and stderr redirection to the Android logTor Lillqvist
On a (non-rooted) device it is not possible to set the log.redirect-stdio property so that it would be effective (i.e. read by the Zygote process when it starts). Such redirection has to be done in-process. Add a (JNI-callable) method to set it up: Point file descriptors 1 and 2 at pipes that are read by a thread that logs each line through the Android logging API. Code based on Android's own logwrapper.c. Change-Id: Id5308293595096a44a2ffed2dbc0c252be109de7
2012-04-02Refactor where patch_libgnustl_shared() and extract_files() are calledTor Lillqvist
2012-04-02Add a JNI_OnLoad() to store the JavaVM* also from non-NativeActivity appsTor Lillqvist
2012-03-30Use correct JNI name mangling of underscoresTor Lillqvist
2012-03-28Add JNI wrapper for InitUCBHelper() and call itTor Lillqvist
2012-03-22Add JNI wrappers for InitVCL and osl_setCommandArgsTor Lillqvist
2012-02-20Work around the fact that empty directories are not present in an .apkTor Lillqvist
The SDK tooling that constructs .apk packages doesn't put empty directories in them. Which makes sense I guess. "Hidden" files (like .gitignore) are also skipped. So a directory like sc/qa/unit/qpro/indeterminate does not show up at all. So, we must pretend that any opendir() of a directory under /assets succeeds. If the .apk doesn't contain any files in such a directory, treat it as existing but empty. We can't know if the corresponding directory from which /assets was constructed actually does exist but is empty or if it doesn't exist.
2012-01-31Add lo_dlclose()Tor Lillqvist
2012-01-31Log time taken by dlopen()Tor Lillqvist
2012-01-27Drop accidental #includeTor Lillqvist
2012-01-27Tweak the st_mode returned by lo_apk_lstat() to match reality betterTor Lillqvist
2012-01-27android: attach as daemon with given JNI version, and don't exit.Michael Meeks
2012-01-27android: push the redraw-needed command into the app thread & waitMichael Meeks
2012-01-26Use lo-bootstrap as the log tagTor Lillqvist
2012-01-26Call the JavaVM's AttachCurrentThread(), can't hurt...Tor Lillqvist
2012-01-26Move the sleep earlier, and log itTor Lillqvist
2012-01-26android: move lo-bootstrap to osl/detail, Attach threads as createdMichael Meeks
2012-01-25WaE: unwind possible undefined warningsMichael Meeks
2012-01-25Bin global_android_app and instead use lo-bootstrap APITor Lillqvist
Instead of introducing a global variable, use the already existing saved android_app pointer in lo-bootstrap.c, and just add a function to retrieve it from there. Store it in the AndroidSalInstance. Reanme osl/detail/android.h back to android_native_app_glue.h, which is the name of that file in NDK/sources. "android.h" sounded to me too grand, as if it was some universal Android header. But if we do start to modify the android_native_app_glue stuff heavily, then it indeed makes sense to call it something else. Until then, revert also some whitespace changes to android_native_app_glue.c for it to be as close as possible to the "upstream" one in the NDK, for clarity.
2012-01-24android: rename native_app_glue.h and install as osl/detail/android.hMichael Meeks
2012-01-24Fill in more struct stat fields in lo_apk_lstat()Tor Lillqvist
Set uid and gid to that of the process, atime to current time, mtime and ctime to the modification timestamp of the archive entry.
2012-01-13Comment out the verbose logging of code that seems to work fineTor Lillqvist
2012-01-12Add unpacking of files from assets/unpack to the data dirTor Lillqvist
2012-01-04Make the apk dirent functions work properlyTor Lillqvist
We must build a directory tree structure corresponding to the files in the .apk, and use that then in lo_apk_opendir()/readdir(). We can't just return the same subdirectory once for each time we come across an entry that has it as a prefix in the zip directory. Use the BSD-licensed "uthash" library (just one .h file actually) from http://uthash.sourceforge.net/ .
2012-01-04Fix the monkey patching to work for an arbitrary offsetTor Lillqvist
We used to patch in a simple "b" instruction with a relative offset that has to fit in 24(+2) bits. Which was not enough in practice. Now patch in a "ldr pc, [pc, #-4]" instead which loads PC from the next word; in ARM code PC cotains the address of the executing instruction + 8), and put the full address of the replacement code into the next word.
2012-01-04Fixes for the lo-bootstrap apk element codeTor Lillqvist
Fix some off-by-one style errors, add a new lo_apk_lstat() function, and (temporarily) add some debugging logging.
2011-12-22Initial untested implementation of dirent style functions for the .apkTor Lillqvist
2011-12-21Need visibility markup for ANativeActivity_onCreate() tooTor Lillqvist
2011-12-20Use visibility attributes as we get compiled with -fvisibility=hiddenTor Lillqvist
2011-12-20Fix compiler warnings for AndroidTor Lillqvist
2011-12-19sal: convert to gbuildMatúš Kukan
2011-11-30Fix build breaker thinkoTor Lillqvist
2011-11-30Android code refactorig and hackingTor Lillqvist
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.