Review Request: Allow user Java/C++ interaction

Tyler Mandry tmandry at gmail.com
Mon May 14 04:24:37 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104450/
-----------------------------------------------------------

(Updated May 14, 2012, 4:24 a.m.)


Review request for Necessitas and BogDan Vatra.


Changes
-------

Incorporated BogDan's changes. Thanks!


Description
-------

Allows interaction between user Java and user C/C++ (JNI) code, by loading the user's code in the main class loader.
SF.net bug: 140

Details
-------
This removes everything in src/android/cpp. qtmain_android.cpp is no more and is now integrated into src/plugins/platforms/android/src/androidjnimain.cpp. It seemed fitting to integrate startQtApp() into the same file as pauseQtApp() and resumeQtApp(). (Additionally this removes redundant copied code, and simplifies how necessitas projects work and are built.)

Compatibility
-------------
New library should be fully compatible with apps *already built* with old versions (before this change.) To build against the new library, existing projects simply need to update their QtActivity.java file.

Other
-----
This doesn't support using JNI with bundled libs. We have to be careful to load certain bundled libs (maybe only the plugin .so) in the delegate class loader, so I could break certain apps by making such a switch. Need a way to categorize the type of bundled lib, in order to decide which class loader to use.


Diffs (updated)
-----

  android/quadruplor/src/org/kde/necessitas/industrius/QtActivity.java 4ecf3c8 
  android/quadruplor/src/org/kde/necessitas/industrius/QtNative.java 3e82ce6 
  android/runtests.pl 2e438fd 
  mkspecs/android-g++/qmake.conf 5904ea1 
  mkspecs/features/qt.prf a254437 
  src/android/cpp/qtmain_android.cpp e5f5fc8 
  src/android/jar/src/org/kde/necessitas/industrius/QtActivityDelegate.java 1d858ce 
  src/android/jar/src/org/kde/necessitas/industrius/QtNative.java 24ebb5b 
  src/android/jar_4/src/org/kde/necessitas/industrius/QtNative.java f0974b9 
  src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl c1101da 
  src/android/java/src/org/kde/necessitas/origo/QtActivity.java fcbccef 
  src/android/java/version.xml 8d194fb 
  src/plugins/platforms/android/src/androidjnimain.cpp 9fa0540 

Diff: http://git.reviewboard.kde.org/r/104450/diff/


Testing
-------

Tested on a Galaxy Nexus and a Nexus One.
New libraries run both old and new apps.
New libraries support JNI interaction.


Thanks,

Tyler Mandry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20120514/46d0fd61/attachment.html>


More information about the Necessitas-devel mailing list