summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Greilich <j.greilich@gmx.de>2023-11-09 14:15:43 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-11-15 17:43:54 +0000
commit77294e0650e9764b84795adbb03d8ecbcdfd13b0 (patch)
tree7915f9de2ff8b8471eccbdda738915efd1e509e3
parentbe8154fc59f4df863afc1a583392b93496f8e982 (diff)
Silence expected java exceptions
Since we expect the calls to "connect" and "close" in checkIsTargetLost() to fail with IOException when the target was lost, we dont need to print the exceptions as log warning. This restores the behavior like it was before the port to the new Qt 6 Android APIs (7d2c6ae66fd61be56b35ae0c59354b695a02d6c7). Pick-to: 6.5 Change-Id: Ic9e14a58827f8b24865202012708644b903d5d70 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 0692168870463c7f32434b5ee1b0e6d762e078fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/nfc/qnearfieldtarget_android.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nfc/qnearfieldtarget_android.cpp b/src/nfc/qnearfieldtarget_android.cpp
index 63e7d62b..c7f842ae 100644
--- a/src/nfc/qnearfieldtarget_android.cpp
+++ b/src/nfc/qnearfieldtarget_android.cpp
@@ -304,14 +304,14 @@ void QNearFieldTargetPrivateImpl::checkIsTargetLost()
methodId = env.findMethod<void>(tagTech.objectClass(), "connect");
if (methodId)
env->CallVoidMethod(tagTech.object(), methodId);
- if (!methodId || env.checkAndClearExceptions()) {
+ if (!methodId || env.checkAndClearExceptions(QJniEnvironment::OutputMode::Silent)) {
handleTargetLost();
return;
}
methodId = env.findMethod<void>(tagTech.objectClass(), "close");
if (methodId)
env->CallVoidMethod(tagTech.object(), methodId);
- if (!methodId || env.checkAndClearExceptions())
+ if (!methodId || env.checkAndClearExceptions(QJniEnvironment::OutputMode::Silent))
handleTargetLost();
}