blob: 6814a35258fc8c632de2e8aeac9cb497d6d2d48d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From 438a864ed9b8158eeac00178341e258642797b35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tinja=20Paavosepp=C3=A4?= <tinja.paavoseppa@qt.io>
Date: Tue, 26 Nov 2024 14:20:52 +0200
Subject: [PATCH 19/20] Android: Quit hosting Context only when app is entirely
Qt
When quitting Qt, only quit the hosting Activity or Service if it's
primarily a Qt app, i.e. Qt is in the driver's seat. When using QtQuick
for Android, i.e. Qt is just a View, we do not want to forcefully quit
Activities, that is up to the app code.
Task-number: QTBUG-123711
Pick-to: 6.8 6.9
Change-Id: Ib98700be8693c3d30a296998b863b0f224c9bf69
---
src/plugins/platforms/android/androidjnimain.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index dd6854f9c95..39c56d2e7b7 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -468,7 +468,7 @@ static void startQtApplication(JNIEnv */*env*/, jclass /*clazz*/)
qWarning() << "dlclose failed:" << dlerror();
}
- if (m_applicationClass)
+ if (m_applicationClass && QtAndroid::isQtApplication())
QJniObject::callStaticMethod<void>(m_applicationClass, "quitApp", "()V");
sem_post(&m_terminateSemaphore);
--
2.48.1
|