summaryrefslogtreecommitdiff
path: root/sal/android
AgeCommit message (Collapse)AuthorFilesLines
2012-01-25WaE: unwind possible undefined warningsMichael Meeks1-3/+5
2012-01-25Bin global_android_app and instead use lo-bootstrap APITor Lillqvist2-12/+10
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 Meeks3-353/+14
2012-01-24Fill in more struct stat fields in lo_apk_lstat()Tor Lillqvist1-2/+23
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 Lillqvist1-4/+5
2012-01-12Add unpacking of files from assets/unpack to the data dirTor Lillqvist1-0/+118
2012-01-04Make the apk dirent functions work properlyTor Lillqvist2-88/+1113
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 Lillqvist1-4/+3
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 Lillqvist1-21/+100
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 Lillqvist1-37/+159
2011-12-21Need visibility markup for ANativeActivity_onCreate() tooTor Lillqvist1-1/+1
2011-12-20Use visibility attributes as we get compiled with -fvisibility=hiddenTor Lillqvist1-0/+18
2011-12-20Fix compiler warnings for AndroidTor Lillqvist1-26/+61
2011-12-19sal: convert to gbuildMatúš Kukan1-59/+0
2011-11-30Fix build breaker thinkoTor Lillqvist1-1/+1
2011-11-30Android code refactorig and hackingTor Lillqvist4-0/+1900
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.