aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2019-08-13 13:48:43 +0200
committerChristian Strømme <christian.stromme@qt.io>2019-08-15 11:42:42 +0200
commit9039930c44d94fd101c260ef3abde680fc369501 (patch)
tree303d5460e6070a5c834124e6d79596336cdea700
parenta50f613a37acf32886ab94c0be780c1f25493d52 (diff)
Fix wrong JNI call function when calling QAndroidIntent::putExtra()
The Java function putExtra() returns an object, so it should be called with callObjectMethod() instead of callMethod(). Fixes: QTBUG-77101 Change-Id: Id6bb402c05b119257fb331db1eb4e016a94c0d52 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
-rw-r--r--src/androidextras/android/qandroidintent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/androidextras/android/qandroidintent.cpp b/src/androidextras/android/qandroidintent.cpp
index fff6e9c..ee6accf 100644
--- a/src/androidextras/android/qandroidintent.cpp
+++ b/src/androidextras/android/qandroidintent.cpp
@@ -112,7 +112,7 @@ void QAndroidIntent::putExtra(const QString &key, const QByteArray &data)
QAndroidJniEnvironment env;
jbyteArray array = env->NewByteArray(data.size());
env->SetByteArrayRegion(array, 0, data.length(), reinterpret_cast<const jbyte*>(data.constData()));
- m_handle.callMethod<void>("putExtra", "(Ljava/lang/String;[B)Landroid/content/Intent;",
+ m_handle.callObjectMethod("putExtra", "(Ljava/lang/String;[B)Landroid/content/Intent;",
QAndroidJniObject::fromString(key).object(), array);
env->DeleteLocalRef(array);
}