summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androiddeadlockprotector.cpp
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2022-03-27 15:50:42 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-04-05 09:12:32 +0000
commit9554d315aa74eaba1726405ee09117e2ebc6111f (patch)
treee5d7b58931a913b3a47e47d561f5e69a66508ded /src/plugins/platforms/android/androiddeadlockprotector.cpp
parent9203a19083784856c44f2a6249364f6a81ae1667 (diff)
Android: Fix deadlock caused by a race between permissions query and IMv6.3.0
Android permissions query blocks Qt main thread. If the input method was activated before the permissions query started, android would try to invoke input method before returning back to permissions query. This will cause a deadlock. Fix the issue by moving the deadlock counter to Qt core and incrementing the value before the permissions query. This will prevent the input method queries to enter Qt main thread. Fixes: QTBUG-99484 Change-Id: I54ea59578880cde4095c26fa2a6a264c4dc1b7ff Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 8bca441b6f65c532915cf3e93ecbe8a5cd2750a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms/android/androiddeadlockprotector.cpp')
-rw-r--r--src/plugins/platforms/android/androiddeadlockprotector.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/plugins/platforms/android/androiddeadlockprotector.cpp b/src/plugins/platforms/android/androiddeadlockprotector.cpp
deleted file mode 100644
index 2bac55f160..0000000000
--- a/src/plugins/platforms/android/androiddeadlockprotector.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "androiddeadlockprotector.h"
-
-QAtomicInt AndroidDeadlockProtector::s_blocked(0);
-