summaryrefslogtreecommitdiff
path: root/src/plugins/platforms/android/androidjnimain.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-01-31 18:08:08 +0100
committerIvan Solovev <ivan.solovev@qt.io>2022-02-09 16:48:26 +0100
commit6d00aac1092d813446a44fbb234995733233f003 (patch)
treec7dc995d65aa026fbbf81d32982c3bb9b03ec860 /src/plugins/platforms/android/androidjnimain.cpp
parent81178294f1ed5fc98944c9d83b38a70523965b17 (diff)
downloadqtbase-6d00aac1092d813446a44fbb234995733233f003.tar.gz
Android: extract parentId for hidden object in advance
This commit amends 850a7f1238e84b6960a84e12687e40cf939a44d9. We can't extract the parentId for the hidden object on Java side, because the Java call is executed in a separate thread, so the original hidden object can be destroyed somewhere in the middle of parentId() call. As a workaround, we get the parentId in advance, on C++ side, and pass it as a parameter to JNI function. Task-number: QTBUG-95764 Pick-to: 6.3 6.2 5.15 Change-Id: Ied2ab4ab39b947f3f582575cf77cc76fbac9e274 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/androidjnimain.cpp')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index e99dca17a2..9816dfb93e 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -215,9 +215,10 @@ namespace QtAndroid
QJniObject::callStaticMethod<void>(m_applicationClass, "notifyAccessibilityLocationChange");
}
- void notifyObjectHide(uint accessibilityObjectId)
+ void notifyObjectHide(uint accessibilityObjectId, uint parentObjectId)
{
- QJniObject::callStaticMethod<void>(m_applicationClass, "notifyObjectHide","(I)V", accessibilityObjectId);
+ QJniObject::callStaticMethod<void>(m_applicationClass, "notifyObjectHide", "(II)V",
+ accessibilityObjectId, parentObjectId);
}
void notifyObjectFocus(uint accessibilityObjectId)