Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d5f47d authored by Diego Vela's avatar Diego Vela
Browse files

Relax height check for folding feature.

Relax the height check for folding feature. It is possible for there to
be a mismatch between the inner screen of a foldable and the outer
screen of a foldable. This causes a crash because the window metrics may
not be updated in time for the folding feature calculation.

Bug: 320818006
Test: Manual - Open the WM Jetpack samples
Test: Open the Display features handle config change samples
Test: Open the device - Expect no crash.
Change-Id: I174a020129a3dd338df5760627dd275165a9ee5f
parent f755d66b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent {
            }
            if (featureRect.left == 0
                    && featureRect.width() != windowConfiguration.getBounds().width()) {
                Log.wtf(TAG, "Horizontal FoldingFeature must have full width."
                Log.w(TAG, "Horizontal FoldingFeature must have full width."
                        + " BaseFeatureRect: " + baseFeature.getRect()
                        + ", FeatureRect: " + featureRect
                        + ", WindowConfiguration: " + windowConfiguration);
@@ -364,7 +364,7 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent {
            }
            if (featureRect.top == 0
                    && featureRect.height() != windowConfiguration.getBounds().height()) {
                Log.wtf(TAG, "Vertical FoldingFeature must have full height."
                Log.w(TAG, "Vertical FoldingFeature must have full height."
                        + " BaseFeatureRect: " + baseFeature.getRect()
                        + ", FeatureRect: " + featureRect
                        + ", WindowConfiguration: " + windowConfiguration);