Adjust the SDK/API version check for getInsetsController()

The function is introduced in API level 30, causing an error
on a 29 device

Amends: eda4049a0142029c192e1690bafffbb98ee4ff99

Change-Id: I5f4e2301d04a0a2e0e2f4037e4c371efd2fef352
Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 40cb7434afe28c4dbe434a35b659e1af5299a3d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Juha Vuolle 2023-01-05 20:59:45 +02:00 committed by Qt Cherry-pick Bot
parent b506bff7d0
commit 1d1fd94a99

View File

@ -977,7 +977,7 @@ public class QtActivityDelegate
private void handleUiModeChange(int uiMode) private void handleUiModeChange(int uiMode)
{ {
// QTBUG-108365 // QTBUG-108365
if (Build.VERSION.SDK_INT >= 29) { if (Build.VERSION.SDK_INT >= 30) {
// Since 29 version we are using Theme_DeviceDefault_DayNight // Since 29 version we are using Theme_DeviceDefault_DayNight
Window window = m_activity.getWindow(); Window window = m_activity.getWindow();
WindowInsetsController controller = window.getInsetsController(); WindowInsetsController controller = window.getInsetsController();