Android: don't keep system visibility cache on both C++ and Java

Since Android Java side is managing the system ui visibility calls,
keep any cached states there to avoid any inconsistency between the
two sides, so Qt always sends the call and Java decides whether
it goes through with it or not.

Pick-to: 6.10 6.10.0
Change-Id: I68dfb64fe38ecd7d71a6aae5bfa2e32b8f481b04
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Assam Boudjelthia 2025-09-10 17:45:29 +03:00
parent 41491e96ac
commit ca17c91c4a
2 changed files with 2 additions and 9 deletions

View File

@ -263,12 +263,8 @@ void QAndroidPlatformWindow::updateSystemUiVisibility()
if (!isNonRegularWindow) {
const bool isFullScreen = (m_windowState & Qt::WindowFullScreen);
const bool expandedToCutout = (flags & Qt::ExpandedClientAreaHint);
if (m_isFullscreen != isFullScreen || m_expandedToCutout != expandedToCutout) {
m_isFullscreen = isFullScreen;
m_expandedToCutout = expandedToCutout;
QtAndroid::backendRegister()->callInterface<QtJniTypes::QtWindowInterface, void>(
"setSystemUiVisibility", isFullScreen, expandedToCutout);
}
QtAndroid::backendRegister()->callInterface<QtJniTypes::QtWindowInterface, void>(
"setSystemUiVisibility", isFullScreen, expandedToCutout);
}
}

View File

@ -112,9 +112,6 @@ private:
Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(safeAreaMarginsChanged)
[[nodiscard]] QMutexLocker<QMutex> destructionGuard();
bool m_isFullscreen;
bool m_expandedToCutout;
};
QT_END_NAMESPACE