summaryrefslogtreecommitdiffstats
path: root/src/android/java
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-02-08 09:28:00 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-08 12:31:02 +0100
commitfbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch)
tree92da72786b3740e37004623612c4fc1c9640d30f /src/android/java
parentc1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff)
parent74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'src/android/java')
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java59
1 files changed, 20 insertions, 39 deletions
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
index ae9ccc09db..9d5578ed6d 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
@@ -471,6 +471,7 @@ public abstract class QtLoader {
}
{
+ // why can't we load the plugins directly from libs ?!?!
String key = BUNDLED_IN_LIB_RESOURCE_ID_KEY;
if (m_contextInfo.metaData.containsKey(key)) {
String[] list = m_context.getResources().getStringArray(m_contextInfo.metaData.getInt(key));
@@ -589,58 +590,41 @@ public abstract class QtLoader {
if (apkDeployFromSystem && libsDir == null)
throw new Exception("");
- String localPrefix = "/data/local/tmp/qt/";
- if (m_contextInfo.metaData.containsKey("android.app.libs_prefix"))
- localPrefix = m_contextInfo.metaData.getString("android.app.libs_prefix");
- String pluginsPrefix = localPrefix;
+ if (m_qtLibs != null) {
+ String libPrefix = libsDir + "lib";
+ for (int i = 0; i < m_qtLibs.length; i++)
+ libraryList.add(libPrefix + m_qtLibs[i] + ".so");
+ }
- boolean bundlingQtLibs = false;
if (m_contextInfo.metaData.containsKey("android.app.bundle_local_qt_libs")
&& m_contextInfo.metaData.getInt("android.app.bundle_local_qt_libs") == 1) {
File dataDir = new File(m_context.getApplicationInfo().dataDir);
- localPrefix = dataDir.getCanonicalPath() + "/";
- pluginsPrefix = localPrefix + "qt-reserved-files/";
+ String dataPath = dataDir.getCanonicalPath() + "/";
+ String pluginsPrefix = dataPath + "qt-reserved-files/";
if (libsDir == null)
throw new Exception("");
- cleanOldCacheIfNecessary(localPrefix, pluginsPrefix);
+ cleanOldCacheIfNecessary(dataPath, pluginsPrefix);
extractBundledPluginsAndImports(pluginsPrefix, libsDir);
- bundlingQtLibs = true;
- }
-
- if (m_qtLibs != null) {
- String libPrefix = libsDir + "lib";
- for (int i = 0; i < m_qtLibs.length; i++)
- libraryList.add(libPrefix + m_qtLibs[i] + ".so");
- }
-
- if (m_contextInfo.metaData.containsKey("android.app.load_local_libs")) {
- String[] extraLibs = m_contextInfo.metaData.getString("android.app.load_local_libs").split(":");
- for (String lib : extraLibs) {
- if (lib.length() > 0)
- libraryList.add((lib.startsWith("lib/") ? localPrefix : pluginsPrefix) + lib);
- }
- }
-
- String dexPaths = new String();
- String pathSeparator = System.getProperty("path.separator", ":");
- if (!bundlingQtLibs && m_contextInfo.metaData.containsKey("android.app.load_local_jars")) {
- String[] jarFiles = m_contextInfo.metaData.getString("android.app.load_local_jars").split(":");
- for (String jar:jarFiles) {
- if (jar.length() > 0) {
- if (dexPaths.length() > 0)
- dexPaths += pathSeparator;
- dexPaths += localPrefix + jar;
+ if (m_contextInfo.metaData.containsKey(BUNDLED_IN_LIB_RESOURCE_ID_KEY)) {
+ String[] extraLibs = m_contextInfo.metaData.getString("android.app.load_local_libs").split(":");
+ for (String lib : extraLibs) {
+ if (!lib.isEmpty())
+ libraryList.add(pluginsPrefix + lib);
}
}
+
+ ENVIRONMENT_VARIABLES += "\tQML2_IMPORT_PATH=" + pluginsPrefix + "/qml"
+ + "\tQML_IMPORT_PATH=" + pluginsPrefix + "/imports"
+ + "\tQT_PLUGIN_PATH=" + pluginsPrefix + "/plugins";
}
Bundle loaderParams = new Bundle();
loaderParams.putInt(ERROR_CODE_KEY, 0);
- loaderParams.putString(DEX_PATH_KEY, dexPaths);
+ loaderParams.putString(DEX_PATH_KEY, new String());
loaderParams.putString(LOADER_CLASS_NAME_KEY, loaderClassName());
if (m_contextInfo.metaData.containsKey("android.app.static_init_classes")) {
loaderParams.putStringArray(STATIC_INIT_CLASSES_KEY,
@@ -683,10 +667,7 @@ public abstract class QtLoader {
ENVIRONMENT_VARIABLES += "\tMINISTRO_ANDROID_STYLE_PATH=" + stylePath
+ "\tQT_ANDROID_THEMES_ROOT_PATH=" + themePath;
- loaderParams.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES
- + "\tQML2_IMPORT_PATH=" + pluginsPrefix + "/qml"
- + "\tQML_IMPORT_PATH=" + pluginsPrefix + "/imports"
- + "\tQT_PLUGIN_PATH=" + pluginsPrefix + "/plugins");
+ loaderParams.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES);
String appParams = null;
if (APPLICATION_PARAMETERS != null)