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

Commit 94bc29c8 authored by Roy Chou's avatar Roy Chou
Browse files

fix(window magnification): fix changeMagnificationSize_expectedWindowSize presubmit error

The window magnifier size calculation In WindowMagnificationControllerTest#changeMagnificationSize_expectedWindowSize is not consistent with the logic in WindowMagnificationController. Therefore, in some cases the result size would not be the same and cause the failing. Accordingly, we fix the calculation in WindowMagnificationControllerTest to ensure the result is consistent.

Bug: 306201035
Bug: 307486608
Flag: NA
Test: atest WindowMagnificationControllerTest locally & test on abtd
Change-Id: I3f61eef32ac31bb55d678e02200102caf0c73b68
parent c672afbd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1278,7 +1278,8 @@ public class WindowMagnificationControllerTest extends SysuiTestCase {

        final float magnificationScaleLarge = 2.5f;
        final int initSize = Math.min(bounds.width(), bounds.height()) / 3;
        final int magnificationSize = (int) (initSize * magnificationScaleLarge);
        final int magnificationSize = (int) (initSize * magnificationScaleLarge)
                - (int) (initSize * magnificationScaleLarge) % 2;

        final int expectedWindowHeight = magnificationSize;
        final int expectedWindowWidth = magnificationSize;