Android: Remove check for screen/window ascpect ratio mismatch

The check was re-introduced in 7a9bc220c7
and moved to QtRootLayout in 6ff88f97a6.
It introduces an issue where the resizing of the application window does
not work if the its aspect ratio is different from the screen's aspect
ratio.

Fixes: QTBUG-126122
Pick-to: 6.7 6.7.2
Change-Id: Id6d26b247b9ca7a8d0e89e1fdea2d77db12a6cfe
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a6b78e6f4dbbf688fc0b1d1487b86890b149d323)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
Jan Moeller 2024-06-06 11:30:27 +02:00 committed by Qt Cherry-pick Bot
parent 3b1d343215
commit 52bb40a088
1 changed files with 0 additions and 19 deletions

View File

@ -32,25 +32,6 @@ class QtRootLayout extends QtLayout
if (activity == null)
return;
DisplayMetrics realMetrics = new DisplayMetrics();
Display display = (Build.VERSION.SDK_INT < Build.VERSION_CODES.R)
? activity.getWindowManager().getDefaultDisplay()
: activity.getDisplay();
if (display == null)
return;
display.getRealMetrics(realMetrics);
if ((realMetrics.widthPixels > realMetrics.heightPixels) != (w > h)) {
// This is an intermediate state during display rotation.
// The new size is still reported for old orientation, while
// realMetrics contain sizes for new orientation. Setting
// such parameters will produce inconsistent results, so
// we just skip them.
// We will have another onSizeChanged() with normal values
// a bit later.
return;
}
QtDisplayManager.setApplicationDisplayMetrics(activity, w, h);
QtDisplayManager.handleOrientationChanges(activity);
}