summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Greilich <j.greilich@gmx.de>2023-11-09 14:15:43 +0100
committerJulian Greilich <j.greilich@gmx.de>2023-11-15 12:17:12 +0100
commit0692168870463c7f32434b5ee1b0e6d762e078fa (patch)
tree7b307c1a1307d95e05dc47cc192c98066d7169c7
parent1af7808c7eb5d392dd5bab6de63b8360bfc62e0e (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.6 6.5 Change-Id: Ic9e14a58827f8b24865202012708644b903d5d70 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-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();
}